php-src/Zend/tests/bug39825.phpt
2020-02-03 22:52:20 +01:00

14 lines
231 B
PHP

--TEST--
Bug #39825 (foreach produces memory error)
--FILE--
<?php
$array = array(1 => 2, "foo" => "bar");
$obj = (object)$array;
foreach ($obj as $name => $value) {
echo "$name -> $value\n";
}
?>
--EXPECT--
1 -> 2
foo -> bar