diff options
author | Dmitry Stogov <dmitry@php.net> | 2006-12-25 19:23:03 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2006-12-25 19:23:03 +0000 |
commit | 4480c5eb5d7adf4437237066ad9eda70d47979b6 (patch) | |
tree | db8a6633e3d2553e23ce8ada9e1afb355b740f0f /Zend/tests/bug39825.phpt | |
parent | 0776e56437fbdcbb92ef5f7e6aa5ae21137a00b7 (diff) | |
download | php-git-4480c5eb5d7adf4437237066ad9eda70d47979b6.tar.gz |
Fixed bug #39825 (foreach produces memory error)
Diffstat (limited to 'Zend/tests/bug39825.phpt')
-rwxr-xr-x | Zend/tests/bug39825.phpt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Zend/tests/bug39825.phpt b/Zend/tests/bug39825.phpt new file mode 100755 index 0000000000..791b329f71 --- /dev/null +++ b/Zend/tests/bug39825.phpt @@ -0,0 +1,13 @@ +--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 |