Annotation of embedaddon/php/ext/spl/tests/spl_001.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: SPL: iterator_to_array() and iterator_count()
                      3: --FILE--
                      4: <?php
                      5: 
                      6: $it = new ArrayObject(array("x"=>1, 1=>2, 3=>3, 4, "1"=>5));
                      7: 
                      8: $ar = iterator_to_array($it);
                      9: 
                     10: var_dump(iterator_count($it));
                     11: 
                     12: print_r($ar);
                     13: 
                     14: foreach($ar as $v)
                     15: {
                     16:        var_dump($v);
                     17: }
                     18: 
                     19: ?>
                     20: ===DONE===
                     21: --EXPECT--
                     22: int(4)
                     23: Array
                     24: (
                     25:     [x] => 1
                     26:     [1] => 5
                     27:     [3] => 3
                     28:     [4] => 4
                     29: )
                     30: int(1)
                     31: int(5)
                     32: int(3)
                     33: int(4)
                     34: ===DONE===

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