xref: /PHP-8.1/Zend/tests/foreach_undefined.phpt (revision 36935e42)
1--TEST--
2foreach() & undefined var
3--FILE--
4<?php
5
6foreach($a as $val);
7
8echo "Done\n";
9?>
10--EXPECTF--
11Warning: Undefined variable $a in %s on line %d
12
13Warning: foreach() argument must be of type array|object, null given in %s on line %d
14Done
15