xref: /PHP-8.3/ext/spl/tests/bug72888.phpt (revision 36935e42)
1--TEST--
2Bug #72888 (Segfault on clone on splFileObject)
3--FILE--
4<?php
5$x = new SplFileObject(__FILE__);
6
7try {
8    $y=clone $x;
9} catch (Error $e) {
10    var_dump($e->getMessage());
11}
12var_dump($y);
13?>
14--EXPECTF--
15string(60) "Trying to clone an uncloneable object of class SplFileObject"
16
17Warning: Undefined variable $y in %s on line %d
18NULL
19