xref: /PHP-7.4/Zend/tests/foreach_list_004.phpt (revision 5ebbdecf)
1--TEST--
2foreach with empty list
3--FILE--
4<?php
5
6$array = [['a', 'b'], 'c', 'd'];
7
8foreach($array as $key => list()) {
9}
10
11?>
12--EXPECTF--
13Fatal error: Cannot use empty list in %sforeach_list_004.php on line %d
14