xref: /PHP-8.3/Zend/tests/bug39825.phpt (revision f8d79582)
1--TEST--
2Bug #39825 (foreach produces memory error)
3--FILE--
4<?php
5$array = array(1 => 2, "foo" => "bar");
6$obj = (object)$array;
7foreach ($obj as $name => $value)  {
8    echo "$name -> $value\n";
9}
10?>
11--EXPECT--
121 -> 2
13foo -> bar
14