dis-bench / src /php /php-src /Zend /tests /dynamic_call /bug69124.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
354 Bytes
--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