php-src/Zend/tests/bug79790.phpt
Marcos Marcolin 641fe23e3a
Improve illegal offset error messages (#10504)
Co-authored-by: Marcos Marcolin <marcos@ixcsoft.com.br>
2023-02-08 12:11:41 +00:00

16 lines
346 B
PHP

--TEST--
Bug #79790: "Illegal offset type" exception during AST evaluation not handled properly
--FILE--
<?php
b();
function b($a = array()[array ()]) {
++$c[function () {}];
}
?>
--EXPECTF--
Fatal error: Uncaught TypeError: Cannot access offset of type array on array in %s:%d
Stack trace:
#0 %s(%d): b()
#1 {main}
thrown in %s on line %d