Return to bug39825.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests |
1.1 ! misho 1: --TEST-- ! 2: Bug #39825 (foreach produces memory error) ! 3: --FILE-- ! 4: <?php ! 5: $array = array(1 => 2, "foo" => "bar"); ! 6: $obj = (object)$array; ! 7: foreach ($obj as $name => $value) { ! 8: echo "$name -> $value\n"; ! 9: } ! 10: ?> ! 11: --EXPECT-- ! 12: 1 -> 2 ! 13: foo -> bar