bug41828.phpt 443 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #41828 (Segfault if extended constructor of RecursiveIterator doesn't call its parent)
  3. --FILE--
  4. <?php
  5. class foo extends RecursiveIteratorIterator {
  6. public function __construct($str) {
  7. }
  8. public function bar() {
  9. }
  10. }
  11. $foo = new foo("This is bar");
  12. echo $foo->bar();
  13. ?>
  14. --EXPECTF--
  15. Fatal error: Uncaught Error: The foo instance wasn't initialized properly in %s:%d
  16. Stack trace:
  17. #0 {main}
  18. thrown in %s on line %d