wrong_inlining_002.phpt 470 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. $this not in object context
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.optimization_level=-1
  7. --EXTENSIONS--
  8. opcache
  9. --FILE--
  10. <?php
  11. class Foo {
  12. private function getConst() {
  13. return 42;
  14. }
  15. public function test() {
  16. var_dump($this->getConst());
  17. }
  18. }
  19. Foo::test();
  20. ?>
  21. --EXPECTF--
  22. Fatal error: Uncaught Error: Non-static method Foo::test() cannot be called statically in %s:%d
  23. Stack trace:
  24. #0 {main}
  25. thrown in %s on line %d