Browse Source

Add test case

PEAR_1_4DEV
Zeev Suraski 23 years ago
parent
commit
60152a0db8
  1. 20
      tests/lang/bug24403.phpt

20
tests/lang/bug24403.phpt

@ -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…
Cancel
Save