1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/Zend/tests/bug68370.phpt
Máté Kocsis 7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00

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