1
0
mirror of https://github.com/php/php-src.git synced 2026-04-30 03:33:17 +02:00
Files
2025-06-24 20:14:40 +02:00

16 lines
311 B
PHP

--TEST--
Using clone statement on undefined variable
--FILE--
<?php
try {
$a = clone $b;
} catch (Error $e) {
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
}
?>
--EXPECTF--
Warning: Undefined variable $b in %s on line %d
TypeError: clone(): Argument #1 ($object) must be of type object, null given