Add test case

This commit is contained in:
Zeev Suraski 2003-07-02 17:51:15 +00:00
parent eb224d4a5f
commit 60152a0db8

20
tests/lang/bug24403.phpt Normal file
View 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--