summaryrefslogtreecommitdiff
path: root/Zend/tests/bug77339.phpt
blob: c21b8cbad294347059305a7e6e5e2d6c7da7ca7c (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
31
32
33
--TEST--
Bug #77339 (__callStatic may get incorrect arguments)
--FILE--
<?php
class Foo
{
    static function __callStatic($name, $arguments) {
       if ($name === 'get') {
            if (!isset($arguments[0])) {
                var_dump(['getSomeWhat']);
                var_dump($arguments);
                exit;
            }
        }
        echo "OK\n";
    }

    protected function get ($key) {
        echo "BUG!!!\n";
    }
}

class Bar
{
    static function __callStatic($name, $arguments) {
        echo Foo::get('getSomeWhat');
    }
}

Bar::someUndefinedStaticFunction();
?>
--EXPECT--
OK