mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_arrayobject_and_arrayiterator_with_objects This also moves tests into a subfolder.
30 lines
344 B
PHP
30 lines
344 B
PHP
--TEST--
|
|
SPL: ArrayIterator/Object and IteratorIterator
|
|
--FILE--
|
|
<?php
|
|
|
|
$it = new ArrayIterator(range(0,3));
|
|
|
|
foreach(new IteratorIterator($it) as $v)
|
|
{
|
|
var_dump($v);
|
|
}
|
|
|
|
$it = new ArrayObject(range(0,3));
|
|
|
|
foreach(new IteratorIterator($it) as $v)
|
|
{
|
|
var_dump($v);
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(0)
|
|
int(1)
|
|
int(2)
|
|
int(3)
|
|
int(0)
|
|
int(1)
|
|
int(2)
|
|
int(3)
|