mirror of
https://github.com/php/php-src.git
synced 2024-10-11 03:22:41 +00:00
27 lines
347 B
PHP
27 lines
347 B
PHP
--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
|