xref: /PHP-8.3/ext/spl/tests/bug41828.phpt (revision 954244b3)
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--EXPECTF--
19Fatal error: Uncaught Error: The foo instance wasn't initialized properly in %s:%d
20Stack trace:
21#0 {main}
22  thrown in %s on line %d
23