mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
7aacc705d0
Closes GH-5958
18 lines
315 B
PHP
18 lines
315 B
PHP
--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
|