php-src/Zend/tests/bug39825.phpt
2012-10-10 10:27:49 +08:00

14 lines
229 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