mirror of
https://github.com/php/php-src.git
synced 2026-04-28 10:43:30 +02:00
ca49a7bec2
RFC: https://wiki.php.net/rfc/clone_with_v2 Co-authored-by: Volker Dusch <volker@tideways-gmbh.com>
13 lines
274 B
PHP
13 lines
274 B
PHP
--TEST--
|
|
Bug #42818 ($foo = clone(array()); leaks memory)
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
$foo = clone(array());
|
|
} catch (Error $e) {
|
|
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
TypeError: clone(): Argument #1 ($object) must be of type object, array given
|