summaryrefslogtreecommitdiff
path: root/Zend/tests/foreach_undefined.phpt
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-08-04 14:12:07 +0000
committerAntony Dovgal <tony2001@php.net>2005-08-04 14:12:07 +0000
commitb87970a9563e683ee765d34a06e9c4a1554a8207 (patch)
treeab69f30ed484344280a9aa37c34c63fe2a19d3c2 /Zend/tests/foreach_undefined.phpt
parentaafc593eb5760c3811db73e870778148ee10b0e4 (diff)
downloadphp-git-b87970a9563e683ee765d34a06e9c4a1554a8207.tar.gz
add test for the last Dmitry's fix
Diffstat (limited to 'Zend/tests/foreach_undefined.phpt')
-rw-r--r--Zend/tests/foreach_undefined.phpt14
1 files changed, 14 insertions, 0 deletions
diff --git a/Zend/tests/foreach_undefined.phpt b/Zend/tests/foreach_undefined.phpt
new file mode 100644
index 0000000000..101d9839e9
--- /dev/null
+++ b/Zend/tests/foreach_undefined.phpt
@@ -0,0 +1,14 @@
+--TEST--
+foreach() & undefined var
+--FILE--
+<?php
+
+foreach($a as $val);
+
+echo "Done\n";
+?>
+--EXPECTF--
+Notice: Undefined variable: a in %s on line %d
+
+Warning: Invalid argument supplied for foreach() in %s on line %d
+Done