mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
14 lines
229 B
PHP
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
|