Annotation of embedaddon/php/ext/spl/tests/bug54304.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #54304 (Setting replacement value for RegexIterator doesn't work)
        !             3: --FILE--
        !             4: <?php
        !             5: class foo extends ArrayIterator {
        !             6:        public function __construct( ) {
        !             7:                parent::__construct(array(
        !             8:                        'test3'=>'test999'));
        !             9:        }
        !            10: }
        !            11: 
        !            12: $h = new foo;
        !            13: $i = new RegexIterator($h, '/^test(.*)/', RegexIterator::REPLACE);
        !            14: $i->replacement = 42;
        !            15: var_dump($i->replacement);
        !            16: foreach ($i as $name=>$value) {
        !            17:        var_dump($name, $value);
        !            18: }
        !            19: var_dump($i->replacement);
        !            20: ?>
        !            21: --EXPECT--
        !            22: int(42)
        !            23: string(5) "test3"
        !            24: string(2) "42"
        !            25: int(42)
        !            26: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>