summaryrefslogtreecommitdiff
path: root/Zend/tests/bug31177-2.phpt
blob: 10083c59edc87b6bd4fd06d27ff5af4ea84c2be2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Bug #31177 (memory corruption because of incorrect refcounting)
--FILE--
<?php
class foo {
  function foo($n=0) {
    if($n) throw new Exception("new");
  }
}
$x = new foo();
try {
  $y=$x->foo(1);
} catch (Exception $e) {
  var_dump($x);
}
--EXPECT--
object(foo)#1 (0) {
}