dis-bench / src /php /php-src /Zend /tests /array_unpack /undef_var.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
297 Bytes
--TEST--
array unpacking with undefined variable
--FILE--
<?php
var_dump([...$arr]);
?>
--EXPECTF--
Warning: Undefined variable $arr in %s on line %d
Fatal error: Uncaught Error: Only arrays and Traversables can be unpacked, null given in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d