xref: /PHP-8.0/Zend/tests/bug69124.phpt (revision f8d79582)
1--TEST--
2Bug 69124: Method name must be as string (invalid error message when using reference to a string)
3--FILE--
4<?php
5class Foo {
6    public function bar() {
7        print "Success\n";
8    }
9}
10
11function test(&$instance, &$method) {
12    $instance->{$method}();
13}
14
15$instance = new Foo;
16$method = "bar";
17
18test($instance, $method);
19?>
20--EXPECT--
21Success
22