diff options
Diffstat (limited to 'tests/lang/bug24403.phpt')
-rw-r--r-- | tests/lang/bug24403.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/lang/bug24403.phpt b/tests/lang/bug24403.phpt new file mode 100644 index 0000000..fe99257 --- /dev/null +++ b/tests/lang/bug24403.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #24403 (scope doesn't properly propagate into internal functions) +--FILE-- +<?php +class a +{ + public $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-- |