php-src/Zend/tests/bug31177-2.phpt

19 lines
299 B
Plaintext
Raw Normal View History

--TEST--
2005-12-27 07:58:55 +08:00
Bug #31177 (memory corruption because of incorrect refcounting)
--FILE--
<?php
class foo {
2015-03-31 22:10:06 +08:00
function __construct($n=0) {
if($n) throw new Exception("new");
}
}
$x = new foo();
try {
2015-03-31 22:10:06 +08:00
$y=$x->__construct(1);
} catch (Exception $e) {
var_dump($x);
}
--EXPECT--
object(foo)#1 (0) {
}