diff options
| -rwxr-xr-x | ext/spl/internal/regexiterator.inc | 4 | ||||
| -rwxr-xr-x | ext/spl/spl_iterators.c | 8 | ||||
| -rwxr-xr-x | ext/spl/tests/iterator_050.phpt | 4 | ||||
| -rwxr-xr-x | ext/spl/tests/iterator_051.phpt | 4 | ||||
| -rwxr-xr-x | ext/spl/tests/iterator_052.phpt | 8 | ||||
| -rwxr-xr-x | ext/spl/tests/iterator_053.phpt | 8 | ||||
| -rwxr-xr-x | ext/spl/tests/iterator_054.phpt | 2 | ||||
| -rwxr-xr-x | ext/spl/tests/iterator_055.phpt | 2 |
8 files changed, 20 insertions, 20 deletions
diff --git a/ext/spl/internal/regexiterator.inc b/ext/spl/internal/regexiterator.inc index c8ff3162d1..fd923eb826 100755 --- a/ext/spl/internal/regexiterator.inc +++ b/ext/spl/internal/regexiterator.inc @@ -43,13 +43,13 @@ class RegexIterator implements FilterIterator * * @param it inner iterator * @param regex the regular expression to match - * @param flags special flags (self::USE_KEY) * @param mode operation mode (one of self::MATCH, self::GET_MATCH, * self::ALL_MATCHES, self::SPLIT) + * @param flags special flags (self::USE_KEY) * @param preg_flags global PREG_* flags, see preg_match(), * preg_match_all(), preg_split() */ - function __construct(Iterator $it, $regex, $flags = 0, $mode = 0, $preg_flags = 0) { + function __construct(Iterator $it, $regex, $mode = 0, $flags = 0, $preg_flags = 0) { parent::__construct($it); $this->regex = $regex; $this->flags = $flags; diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index ffdbf240e5..9269df7c49 100755 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -1009,7 +1009,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z intern->u.regex.use_flags = ZEND_NUM_ARGS() >= 5; intern->u.regex.flags = 0; intern->u.regex.preg_flags = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|lll", &zobject, ce_inner, ®ex, ®ex_len, &intern->u.regex.flags, &mode, &intern->u.regex.preg_flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|lll", &zobject, ce_inner, ®ex, ®ex_len, &mode, &intern->u.regex.flags, &intern->u.regex.preg_flags) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } @@ -1376,7 +1376,7 @@ SPL_METHOD(ParentIterator, getChildren) } /* }}} */ #if HAVE_PCRE || HAVE_BUNDLED_PCRE -/* {{{ proto void RegexIterator::__construct(Iterator it, string regex [, int flags [, int mode [, int preg_flags]]]) +/* {{{ proto void RegexIterator::__construct(Iterator it, string regex [, int mode [, int flags [, int preg_flags]]]) Create an RegexIterator from another iterator and a regular expression */ SPL_METHOD(RegexIterator, __construct) { @@ -1484,7 +1484,7 @@ SPL_METHOD(RegexIterator, accept) } } /* }}} */ -/* {{{ proto void RecursiveRegexIterator::__construct(RecursiveIterator it, string regex [, int flags [, int mode [, int preg_flags]]]) +/* {{{ proto void RecursiveRegexIterator::__construct(RecursiveIterator it, string regex [, int mode [, int flags [, int preg_flags]]]) Create an RecursiveRegexIterator from another recursive iterator and a regular expression */ SPL_METHOD(RecursiveRegexIterator, __construct) { @@ -1624,8 +1624,8 @@ static ZEND_BEGIN_ARG_INFO_EX(arginfo_regex_it___construct, 0, 0, 2) ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0) ZEND_ARG_INFO(0, regex) - ZEND_ARG_INFO(0, flags) ZEND_ARG_INFO(0, mode) + ZEND_ARG_INFO(0, flags) ZEND_ARG_INFO(0, preg_flags) ZEND_END_ARG_INFO(); diff --git a/ext/spl/tests/iterator_050.phpt b/ext/spl/tests/iterator_050.phpt index 983dfa4573..6bd84a3a87 100755 --- a/ext/spl/tests/iterator_050.phpt +++ b/ext/spl/tests/iterator_050.phpt @@ -18,10 +18,10 @@ class MyRegexIterator extends RegexIterator } $ar = new ArrayIterator(array('1','1,2','1,2,3','',NULL,array(),'FooBar',',',',,')); -$it = new MyRegexIterator($ar, '/(\d),(\d)/', 0, RegexIterator::GET_MATCH); +$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::GET_MATCH); $it->show(); -$it = new MyRegexIterator($ar, '/(\d)/', 0, RegexIterator::GET_MATCH); +$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::GET_MATCH); $it->show(); var_dump($ar); diff --git a/ext/spl/tests/iterator_051.phpt b/ext/spl/tests/iterator_051.phpt index d396612ca6..9b319acefd 100755 --- a/ext/spl/tests/iterator_051.phpt +++ b/ext/spl/tests/iterator_051.phpt @@ -18,10 +18,10 @@ class MyRegexIterator extends RegexIterator } $ar = new ArrayIterator(array('1'=>0,'1,2'=>1,'1,2,3'=>2,0=>3,'FooBar'=>4,','=>5,',,'=>6)); -$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::USE_KEY, RegexIterator::GET_MATCH); +$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::GET_MATCH, RegexIterator::USE_KEY); $it->show(); -$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::USE_KEY, RegexIterator::GET_MATCH); +$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::GET_MATCH, RegexIterator::USE_KEY); $it->show(); var_dump($ar); diff --git a/ext/spl/tests/iterator_052.phpt b/ext/spl/tests/iterator_052.phpt index 827c8f00ac..9bd7d899ec 100755 --- a/ext/spl/tests/iterator_052.phpt +++ b/ext/spl/tests/iterator_052.phpt @@ -9,11 +9,11 @@ class MyRegexIterator extends RegexIterator { public $uk, $re; - function __construct($it, $re, $flags, $mode) + function __construct($it, $re, $mode, $flags = 0) { $this->uk = $flags & self::USE_KEY; $this->re = $re; - parent::__construct($it, $re, $flags, $mode); + parent::__construct($it, $re, $mode, $flags); } function show() @@ -35,10 +35,10 @@ class MyRegexIterator extends RegexIterator } $ar = new ArrayIterator(array('1','1,2','1,2,3','',NULL,array(),'FooBar',',',',,')); -$it = new MyRegexIterator($ar, '/(\d),(\d)/', 0, RegexIterator::ALL_MATCHES); +$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::ALL_MATCHES); $it->show(); -$it = new MyRegexIterator($ar, '/(\d)/', 0, RegexIterator::ALL_MATCHES); +$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::ALL_MATCHES); $it->show(); var_dump($ar); diff --git a/ext/spl/tests/iterator_053.phpt b/ext/spl/tests/iterator_053.phpt index c4d7418aaf..4d68b0113f 100755 --- a/ext/spl/tests/iterator_053.phpt +++ b/ext/spl/tests/iterator_053.phpt @@ -9,11 +9,11 @@ class MyRegexIterator extends RegexIterator { public $uk, $re; - function __construct($it, $re, $flags, $mode) + function __construct($it, $re, $mode, $flags = 0) { $this->uk = $flags & self::USE_KEY; $this->re = $re; - parent::__construct($it, $re, $flags, $mode); + parent::__construct($it, $re, $mode, $flags); } function show() @@ -35,10 +35,10 @@ class MyRegexIterator extends RegexIterator } $ar = new ArrayIterator(array('1','1,2','1,2,3','',NULL,array(),'FooBar',',',',,')); -$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::USE_KEY, RegexIterator::ALL_MATCHES); +$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::ALL_MATCHES, RegexIterator::USE_KEY); $it->show(); -$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::USE_KEY, RegexIterator::ALL_MATCHES); +$it = new MyRegexIterator($ar, '/(\d)/', RegexIterator::ALL_MATCHES, RegexIterator::USE_KEY); $it->show(); var_dump($ar); diff --git a/ext/spl/tests/iterator_054.phpt b/ext/spl/tests/iterator_054.phpt index b3aaf4f45f..3f724697a9 100755 --- a/ext/spl/tests/iterator_054.phpt +++ b/ext/spl/tests/iterator_054.phpt @@ -18,7 +18,7 @@ class MyRegexIterator extends RegexIterator } $ar = new ArrayIterator(array('1','1,2','1,2,3','',NULL,array(),'FooBar',',',',,')); -$it = new MyRegexIterator($ar, '/,/', 0, RegexIterator::SPLIT); +$it = new MyRegexIterator($ar, '/,/', RegexIterator::SPLIT); $it->show(); diff --git a/ext/spl/tests/iterator_055.phpt b/ext/spl/tests/iterator_055.phpt index 9d881a1129..d6c8b6853c 100755 --- a/ext/spl/tests/iterator_055.phpt +++ b/ext/spl/tests/iterator_055.phpt @@ -18,7 +18,7 @@ class MyRegexIterator extends RegexIterator } $ar = new ArrayIterator(array('1'=>0,'1,2'=>1,'1,2,3'=>2,0=>3,'FooBar'=>4,','=>5,',,'=>6)); -$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::USE_KEY, RegexIterator::SPLIT); +$it = new MyRegexIterator($ar, '/(\d),(\d)/', RegexIterator::SPLIT, RegexIterator::USE_KEY); $it->show(); |
