php-src/Zend/tests/foreach_undefined.phpt
2020-03-31 13:02:32 +02:00

15 lines
243 B
PHP

--TEST--
foreach() & undefined var
--FILE--
<?php
foreach($a as $val);
echo "Done\n";
?>
--EXPECTF--
Warning: Undefined variable $a in %s on line %d
Warning: foreach() argument must be of type array|object, null given in %s on line %d
Done