]> granicus.if.org Git - php/commitdiff
Add missed tests for FETCH_GLOBAL_LOCK change
authorNikita Popov <nikic@php.net>
Thu, 10 Dec 2015 18:17:17 +0000 (19:17 +0100)
committerNikita Popov <nikic@php.net>
Thu, 10 Dec 2015 18:17:17 +0000 (19:17 +0100)
Zend/tests/global_with_side_effect_name.phpt [new file with mode: 0644]

diff --git a/Zend/tests/global_with_side_effect_name.phpt b/Zend/tests/global_with_side_effect_name.phpt
new file mode 100644 (file)
index 0000000..a1ee240
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+Global variable import using a name with side effects
+--FILE--
+<?php
+
+function sf($arg) {
+    echo "called\n";
+    return $arg;
+}
+
+function test() {
+    global ${sf("a")};
+    var_dump($a);
+}
+
+$a = 42;
+test();
+
+?>
+--EXPECT--
+called
+int(42)