xref: /PHP-8.3/ext/spl/tests/gh16477-2.phpt (revision a19029fc)
1--TEST--
2GH-16477-2: Memory leak when calling SplTempFileObject::__constructor() twice
3--FILE--
4<?php
5
6$obj = new SplTempFileObject();
7
8try {
9    $obj->__construct();
10} catch (Throwable $e) {
11    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
12}
13$obj->__debugInfo();
14
15?>
16DONE
17--EXPECT--
18Error: Cannot call constructor twice
19DONE
20