bug46381.phpt 465 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #46381 (wrong $this passed to internal methods causes segfault)
  3. --SKIPIF--
  4. <?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
  5. --FILE--
  6. <?php
  7. class test {
  8. public function test() {
  9. return ArrayIterator::current();
  10. }
  11. }
  12. $test = new test();
  13. $test->test();
  14. echo "Done\n";
  15. ?>
  16. --EXPECTF--
  17. Fatal error: Non-static method ArrayIterator::current() cannot be called statically, assuming $this from incompatible context in %s on line %d