mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
- Add test case for bug 20120, bison bug.
This commit is contained in:
parent
7a71b3ba38
commit
edf4496491
26
tests/classes/bug20120.phpt
Normal file
26
tests/classes/bug20120.phpt
Normal file
@ -0,0 +1,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
|
Loading…
Reference in New Issue
Block a user