diff options
-rw-r--r-- | Zend/tests/bug70748.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/global_with_side_effect_name.phpt | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/Zend/tests/bug70748.phpt b/Zend/tests/bug70748.phpt index 148a4a9aec..feb0e2a59d 100644 --- a/Zend/tests/bug70748.phpt +++ b/Zend/tests/bug70748.phpt @@ -12,7 +12,7 @@ var_dump(parse_ini_file($ini_file)); ?> --CLEAN-- <?php -unlink(__DIR__ . "bug70748.ini"); +unlink(__DIR__ . "/bug70748.ini"); ?> --EXPECTF-- Warning: syntax error, unexpected $end, expecting '}' in %sbug70748.ini on line %d diff --git a/Zend/tests/global_with_side_effect_name.phpt b/Zend/tests/global_with_side_effect_name.phpt new file mode 100644 index 0000000000..a1ee240c48 --- /dev/null +++ b/Zend/tests/global_with_side_effect_name.phpt @@ -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) |