xref: /PHP-8.1/Zend/tests/bug79790.phpt (revision eaf6303a)
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: Illegal offset type in %s:%d
12Stack trace:
13#0 %s(%d): b()
14#1 {main}
15  thrown in %s on line %d
16