mirror of
https://github.com/php/php-src.git
synced 2024-12-25 01:40:50 +08:00
32 lines
393 B
PHP
32 lines
393 B
PHP
--TEST--
|
|
Bug #51176 (Static calling in non-static method behaves like $this->)
|
|
--FILE--
|
|
<?php
|
|
class Foo
|
|
{
|
|
public function start()
|
|
{
|
|
self::bar();
|
|
static::bar();
|
|
Foo::bar();
|
|
}
|
|
|
|
public function __call($n, $a)
|
|
{
|
|
echo "instance\n";
|
|
}
|
|
|
|
public static function __callStatic($n, $a)
|
|
{
|
|
echo "static\n";
|
|
}
|
|
}
|
|
|
|
$foo = new Foo();
|
|
$foo->start();
|
|
|
|
?>
|
|
--EXPECT--
|
|
instance
|
|
instance
|
|
instance
|