summaryrefslogtreecommitdiff
path: root/Zend/tests/bug68370.phpt
blob: ec5f5ed9ff19cd7db7c6b4e59bd753d60c622889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Bug #68370 "unset($this)" can make the program crash
--FILE--
<?php
class C {
    public function test() {
        unset($this);
        return get_defined_vars();
    }
}
$c = new C();
$x = $c->test();
print_r($x);
unset($c, $x);
?>
--EXPECTF--
Fatal error: Cannot unset $this in %sbug68370.php on line 4