bug51176.phpt 449 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Bug #51176 (Static calling in non-static method behaves like $this->)
  3. --FILE--
  4. <?php
  5. class Foo
  6. {
  7. public function start()
  8. {
  9. self::bar();
  10. static::bar();
  11. Foo::bar();
  12. }
  13. public function __call($n, $a)
  14. {
  15. echo "instance\n";
  16. }
  17. public static function __callStatic($n, $a)
  18. {
  19. echo "static\n";
  20. }
  21. }
  22. $foo = new Foo();
  23. $foo->start();
  24. ?>
  25. --EXPECT--
  26. instance
  27. instance
  28. instance