summaryrefslogtreecommitdiff
path: root/Zend/tests/bug69124.phpt
blob: c704a49b3e8f944464b693ed4c132d249a660890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--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