xref: /PHP-7.1/Zend/tests/bug38234.phpt (revision 610c7fbe)
1--TEST--
2Bug #38234 (Exception in __clone makes memory leak)
3--FILE--
4<?php
5class Foo {
6	function __clone() {
7		throw new Exception();
8	}
9}
10try {
11	$x = new Foo();
12	$y = clone $x;
13} catch (Exception $e) {
14}
15echo "ok\n";
16?>
17--EXPECT--
18ok
19