bug46381.phpt 438 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #46381 (wrong $this passed to internal methods causes segfault)
  3. --FILE--
  4. <?php
  5. class test {
  6. public function method() {
  7. return ArrayIterator::current();
  8. }
  9. }
  10. $test = new test();
  11. $test->method();
  12. echo "Done\n";
  13. ?>
  14. --EXPECTF--
  15. Fatal error: Uncaught Error: Non-static method ArrayIterator::current() cannot be called statically in %s:%d
  16. Stack trace:
  17. #0 %s(%d): test->method()
  18. #1 {main}
  19. thrown in %s on line %d