diff options
author | Xinchen Hui <laruence@php.net> | 2014-11-10 13:46:47 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2014-11-10 13:46:47 +0800 |
commit | ab849392549c41fd3fc3d6ed2a324688f2afe47d (patch) | |
tree | e8ed69339981d95fbacd55af697b6d8a39e5ae8f /Zend/tests | |
parent | 551593707384364705cd954a52c6e4089805f0ef (diff) | |
download | php-git-ab849392549c41fd3fc3d6ed2a324688f2afe47d.tar.gz |
Fixed bug #68370 ("unset($this)" can make the program crash)
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/bug68370.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/bug68370.phpt b/Zend/tests/bug68370.phpt new file mode 100644 index 0000000000..25589bf455 --- /dev/null +++ b/Zend/tests/bug68370.phpt @@ -0,0 +1,18 @@ +--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-- +Array +( +) |