summaryrefslogtreecommitdiff
path: root/tests/lang/bug24403.phpt
blob: fe99257d3d3ae89af426cea17ec41fd235cafc6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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--