xref: /PHP-8.1/Zend/tests/dynamic_call_007.phpt (revision 675e9751)
1--TEST--
2Dynamic calls to scope introspection functions are forbidden (misoptimization)
3--FILE--
4<?php
5
6function test() {
7    $i = 1;
8    try {
9        array_map('extract', [['i' => new stdClass]]);
10    } catch (\Error $e) {
11        echo $e->getMessage() . "\n";
12    }
13    $i += 1;
14    var_dump($i);
15}
16test();
17
18?>
19--EXPECT--
20Cannot call extract() dynamically
21int(2)
22