mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: Add missed tests for FETCH_GLOBAL_LOCK change Fix cleanup in bug70748.phpt
This commit is contained in:
commit
f30381ec22
2 changed files with 23 additions and 1 deletions
|
@ -12,7 +12,7 @@ var_dump(parse_ini_file($ini_file));
|
||||||
?>
|
?>
|
||||||
--CLEAN--
|
--CLEAN--
|
||||||
<?php
|
<?php
|
||||||
unlink(__DIR__ . "bug70748.ini");
|
unlink(__DIR__ . "/bug70748.ini");
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Warning: syntax error, unexpected $end, expecting '}' in %sbug70748.ini on line %d
|
Warning: syntax error, unexpected $end, expecting '}' in %sbug70748.ini on line %d
|
||||||
|
|
22
Zend/tests/global_with_side_effect_name.phpt
Normal file
22
Zend/tests/global_with_side_effect_name.phpt
Normal file
|
@ -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)
|
Loading…
Add table
Add a link
Reference in a new issue