mirror of
https://github.com/php/php-src.git
synced 2024-12-17 13:59:28 +08:00
24 lines
322 B
PHP
24 lines
322 B
PHP
--TEST--
|
|
Temporary leak on exception
|
|
--FILE--
|
|
<?php
|
|
|
|
function ops() {
|
|
throw new Exception();
|
|
}
|
|
|
|
try {
|
|
$x = 2;
|
|
$y = new stdClass;
|
|
while ($x-- && new stdClass) {
|
|
$r = [$x] + ($y ? ((array) $x) + [2] : ops());
|
|
$y = (array) $y;
|
|
}
|
|
} catch (Exception $e) {
|
|
}
|
|
|
|
?>
|
|
==DONE==
|
|
--EXPECT--
|
|
==DONE==
|