summaryrefslogtreecommitdiff
path: root/Zend/tests/bug68370.phpt
blob: 73411ca9b9546b79bd7268ed8b66fe5e4a120b3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--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