summaryrefslogtreecommitdiff
path: root/Zend/tests/bug71622.phpt
blob: c23547788a0342e6e10eb0c2fcc79982e1b5942e (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