mirror of
https://github.com/php/php-src.git
synced 2024-12-15 04:45:03 +08:00
22 lines
339 B
PHP
22 lines
339 B
PHP
--TEST--
|
|
Bug 69124: Method name must be as string (invalid error message when using reference to a string)
|
|
--FILE--
|
|
<?php
|
|
class Foo {
|
|
public function bar() {
|
|
print "Success\n";
|
|
}
|
|
}
|
|
|
|
function test(&$instance, &$method) {
|
|
$instance->{$method}();
|
|
}
|
|
|
|
$instance = new Foo;
|
|
$method = "bar";
|
|
|
|
test($instance, $method);
|
|
?>
|
|
--EXPECT--
|
|
Success
|