summaryrefslogtreecommitdiff
path: root/tests/classes/bug20120.phpt
blob: 8cc326eb09da605578366c41de38a778c4ca078b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
Methods via variable name, bug #20120
--SKIP--
--FILE--
<?php
class bugtest {
        function bug() {
                echo "test\n";
        }
	function refbug() {
		echo "test2\n";
	}
}
$method='bug';
bugtest::$method();
$foo=&$method;
$method='refbug';
bugtest::$foo();

$t = new bugtest;
$t->$method();
?>
--EXPECT--
test
test2
test2