mirror of
https://github.com/php/php-src.git
synced 2024-12-14 04:16:30 +08:00
30 lines
559 B
PHP
30 lines
559 B
PHP
--TEST--
|
|
Dynamic calls to scope introspection functions are forbidden
|
|
--FILE--
|
|
<?php
|
|
|
|
function test_calls($func) {
|
|
$i = 1;
|
|
|
|
array_map($func, [['i' => new stdClass]]);
|
|
var_dump($i);
|
|
|
|
$func(['i' => new stdClass]);
|
|
var_dump($i);
|
|
|
|
call_user_func($func, ['i' => new stdClass]);
|
|
var_dump($i);
|
|
}
|
|
test_calls('extract');
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Cannot call extract() dynamically in %s on line %d
|
|
int(1)
|
|
|
|
Warning: Cannot call extract() dynamically in %s on line %d
|
|
int(1)
|
|
|
|
Warning: Cannot call extract() dynamically in %s on line %d
|
|
int(1)
|