mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Add test case
This commit is contained in:
parent
eb224d4a5f
commit
60152a0db8
20
tests/lang/bug24403.phpt
Normal file
20
tests/lang/bug24403.phpt
Normal file
@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #24403 (scope doesn't properly propagate into internal functions)
|
||||
--FILE--
|
||||
<?
|
||||
class a
|
||||
{
|
||||
var $a = array();
|
||||
|
||||
function a()
|
||||
{
|
||||
$output = preg_replace(
|
||||
'!\{\s*([a-z0-9_]+)\s*\}!sie',
|
||||
"(in_array('\\1',\$this->a) ? '\'.\$p[\'\\1\'].\'' :
|
||||
'\'.\$r[\'\\1\'].\'')",
|
||||
"{a} b {c}");
|
||||
}
|
||||
}
|
||||
new a();
|
||||
?>
|
||||
--EXPECT--
|
Loading…
Reference in New Issue
Block a user