mirror of
https://github.com/php/php-src.git
synced 2024-12-15 12:54:57 +08:00
19 lines
236 B
Plaintext
19 lines
236 B
Plaintext
|
--TEST--
|
||
|
Bug #38234 (Exception in __clone makes memory leak)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
class Foo {
|
||
|
function __clone() {
|
||
|
throw new Exception();
|
||
|
}
|
||
|
}
|
||
|
try {
|
||
|
$x = new Foo();
|
||
|
$y = clone $x;
|
||
|
} catch (Exception $e) {
|
||
|
}
|
||
|
echo "ok\n";
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
ok
|