xref: /PHP-8.0/ext/opcache/tests/opt/sccp_040.phpt (revision 84ea0aa6)
1--TEST--
2SCCP 040: Memory leak
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--FILE--
8<?php
9function f() {
10    $y[] = $arr[] = array($y);
11    $arr();
12}
13f();
14?>
15--EXPECTF--
16Warning: Undefined variable $y in %ssccp_040.php on line 3
17
18Fatal error: Uncaught Error: Array callback must have exactly two elements in %ssccp_040.php:4
19Stack trace:
20#0 %ssccp_040.php(6): f()
21#1 {main}
22  thrown in %ssccp_040.php on line 4
23