xref: /PHP-8.1/Zend/tests/clone_003.phpt (revision 36935e42)
1--TEST--
2Using clone statement on undefined variable
3--FILE--
4<?php
5
6$a = clone $b;
7
8?>
9--EXPECTF--
10Warning: Undefined variable $b in %s on line %d
11
12Fatal error: Uncaught Error: __clone method called on non-object in %s:%d
13Stack trace:
14#0 {main}
15  thrown in %s on line %d
16