php-src/Zend/tests/dynamic_call_008.phpt
Nikita Popov 70f0546885 Don't optimize special dynamic calls to non-dynamic
As it drops the warning. This is more problematic with constant
propagation, as tests would fail.

Extract a zend_optimizer_classify_function() function, as its now
needed by zend_cfg and update_opN.
2016-06-05 22:04:36 +02:00

14 lines
239 B
PHP

--TEST--
Don't optimize dynamic call to non-dynamic one if it drops the warning
--FILE--
<?php
function test() {
((string) 'extract')(['a' => 42]);
}
test();
?>
--EXPECTF--
Warning: Cannot call extract() dynamically in %s on line %d