php-src/Zend/tests/dynamic_call_007.phpt
2019-08-23 20:01:51 +02:00

22 lines
366 B
PHP

--TEST--
Dynamic calls to scope introspection functions are forbidden (misoptimization)
--FILE--
<?php
function test() {
$i = 1;
try {
array_map('extract', [['i' => new stdClass]]);
} catch (\Error $e) {
echo $e->getMessage() . "\n";
}
$i += 1;
var_dump($i);
}
test();
?>
--EXPECT--
Cannot call extract() dynamically
int(2)