File tree 2 files changed +7
-9
lines changed
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 3
3
?? ??? 2009, PHP 5.3.0 Beta 2
4
4
- Fixed bug #47229 (preg_quote() should escape the '-' char). (Nuno)
5
5
- Fixed bug #46347 (parse_ini_file() doesn't support * in keys). (Nuno)
6
+ - Fixed bug #47031 (Fix constants in DualIterator example). (Etienne)
6
7
7
8
8
9
29 Jan 2009, PHP 5.3.0 Beta 1
Original file line number Diff line number Diff line change @@ -23,10 +23,9 @@ class DualIterator implements Iterator
23
23
24
24
const KEY_LHS = 0x10 ;
25
25
const KEY_RHS = 0x20 ;
26
- const KEY_ARRAY = 0x30 ;
27
26
const KEY_0 = 0x00 ;
28
27
29
- const DEFAULT_FLAGS = 0x33 ;
28
+ const DEFAULT_FLAGS = 0x13 ;
30
29
31
30
private $ lhs ;
32
31
private $ rhs ;
@@ -39,7 +38,7 @@ class DualIterator implements Iterator
39
38
* @param flags iteration flags
40
39
*/
41
40
function __construct (Iterator $ lhs , Iterator $ rhs ,
42
- $ flags = 0x33 /*DualIterator::DEFAULT_FLAGS*/ )
41
+ $ flags = 0x13 /*DualIterator::DEFAULT_FLAGS*/ )
43
42
{
44
43
$ this ->lhs = $ lhs ;
45
44
$ this ->rhs = $ rhs ;
@@ -107,20 +106,18 @@ class DualIterator implements Iterator
107
106
}
108
107
}
109
108
110
- /** @return current value depending on KEY_* flags
109
+ /** @return key value depending on KEY_* flags
111
110
*/
112
111
function key ()
113
112
{
114
113
switch ($ this ->flags & 0xF0 )
115
114
{
116
115
default :
117
- case self ::CURRENT_ARRAY :
118
- return array ($ this ->lhs ->key (), $ this ->rhs ->key ());
119
- case self ::CURRENT_LHS :
116
+ case self ::KEY_LHS :
120
117
return $ this ->lhs ->key ();
121
- case self ::CURRENT_RHS :
118
+ case self ::KEY_RHS :
122
119
return $ this ->rhs ->key ();
123
- case self ::CURRENT_0 :
120
+ case self ::KEY_0 :
124
121
return NULL ;
125
122
}
126
123
}
You can’t perform that action at this time.
0 commit comments