summaryrefslogtreecommitdiff
path: root/Zend/tests/bug71622.phpt
blob: 3ef0ba80e1e241feb95fa5a062cc8128104e106f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
Bug #71622 (Strings used in pass-as-reference cannot be used to invoke C::$callable())
--FILE--
<?php

function getMethodName(&$methodName) {
	$methodName = Abc::METHOD_NAME;
}

class Abc {
	const METHOD_NAME = "goal";

	private static function goal() {
		echo "success\n";
	}

	public static function run() {
		$method = "foobar";
		getMethodName($method);
		var_dump(is_callable("self::$method"));
		self::$method();
	}
}

Abc::run();

?>
--EXPECT--
bool(true)
success