xref: /PHP-7.4/ext/spl/tests/bug41828.phpt (revision 32f7337b)
1--TEST--
2Bug #41828 (Segfault if extended constructor of RecursiveIterator doesn't call its parent)
3--FILE--
4<?php
5class foo extends RecursiveIteratorIterator {
6
7    public function __construct($str) {
8    }
9
10    public function bar() {
11    }
12}
13
14$foo = new foo("This is bar");
15echo $foo->bar();
16
17?>
18==DONE==
19<?php exit(0); ?>
20--EXPECTF--
21Fatal error: main(): The foo instance wasn't initialized properly in %s on line %d
22