php-src/Zend/tests/bug38234.phpt

19 lines
254 B
Plaintext
Raw Normal View History

--TEST--
Bug #38234 (Exception in __clone makes memory leak)
--FILE--
<?php
class Foo {
2020-02-04 05:52:20 +08:00
function __clone() {
throw new Exception();
}
}
try {
2020-02-04 05:52:20 +08:00
$x = new Foo();
$y = clone $x;
} catch (Exception $e) {
}
echo "ok\n";
?>
--EXPECT--
ok