summaryrefslogtreecommitdiff
path: root/Zend/tests/dynamic_call_007.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/dynamic_call_007.phpt')
-rw-r--r--Zend/tests/dynamic_call_007.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/dynamic_call_007.phpt b/Zend/tests/dynamic_call_007.phpt
new file mode 100644
index 0000000000..61ae182914
--- /dev/null
+++ b/Zend/tests/dynamic_call_007.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Dynamic calls to scope introspection functions are forbidden (misoptimization)
+--FILE--
+<?php
+
+function test() {
+ $i = 1;
+ array_map('extract', [['i' => new stdClass]]);
+ $i += 1;
+ var_dump($i);
+}
+test();
+
+?>
+--EXPECTF--
+Warning: Cannot call extract() dynamically in %s on line %d
+int(2)