xref: /php-src/Zend/tests/bug77339.phpt (revision f8d79582)
1--TEST--
2Bug #77339 (__callStatic may get incorrect arguments)
3--FILE--
4<?php
5class Foo
6{
7    static function __callStatic($name, $arguments) {
8       if ($name === 'get') {
9            if (!isset($arguments[0])) {
10                var_dump(['getSomeWhat']);
11                var_dump($arguments);
12                exit;
13            }
14        }
15        echo "OK\n";
16    }
17
18    protected function get ($key) {
19        echo "BUG!!!\n";
20    }
21}
22
23class Bar
24{
25    static function __callStatic($name, $arguments) {
26        echo Foo::get('getSomeWhat');
27    }
28}
29
30Bar::someUndefinedStaticFunction();
31?>
32--EXPECT--
33OK
34