php-src/Zend/tests/bug79790.phpt
Nikita Popov eaf6303a74 Fixed bug #79790
I haven't tracked down in detail where the interaction with
increment_function comes from, but the root problem here is failure
to handle the illegal offset type exception.
2020-07-07 10:56:55 +02:00

16 lines
322 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: Illegal offset type in %s:%d
Stack trace:
#0 %s(%d): b()
#1 {main}
thrown in %s on line %d