xref: /PHP-7.4/Zend/tests/bug71622.phpt (revision 3ce6ad9d)
1--TEST--
2Bug #71622 (Strings used in pass-as-reference cannot be used to invoke C::$callable())
3--FILE--
4<?php
5
6function getMethodName(&$methodName) {
7	$methodName = Abc::METHOD_NAME;
8}
9
10class Abc {
11	const METHOD_NAME = "goal";
12
13	private static function goal() {
14		echo "success\n";
15	}
16
17	public static function run() {
18		$method = "foobar";
19		getMethodName($method);
20		var_dump(is_callable("self::$method"));
21		self::$method();
22	}
23}
24
25Abc::run();
26
27?>
28--EXPECT--
29bool(true)
30success
31