php-src/tests/lang/bug24403.phpt
2003-07-02 18:00:51 +00:00

21 lines
329 B
PHP

--TEST--
Bug #24403 (scope doesn't properly propagate into internal functions)
--FILE--
<?php
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--