mirror of
https://github.com/php/php-src.git
synced 2024-12-12 03:15:29 +08:00
34 lines
606 B
PHP
34 lines
606 B
PHP
--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
|