xref: /php-src/Zend/tests/bug79790.phpt (revision 641fe23e)
1--TEST--
2Bug #79790: "Illegal offset type" exception during AST evaluation not handled properly
3--FILE--
4<?php
5b();
6function b($a = array()[array ()]) {
7    ++$c[function () {}];
8}
9?>
10--EXPECTF--
11Fatal error: Uncaught TypeError: Cannot access offset of type array on array in %s:%d
12Stack trace:
13#0 %s(%d): b()
14#1 {main}
15  thrown in %s on line %d
16