Hi, I think, I found the root problem of https://bugs.php.net/bug.php?id=70805
unset($a) or unser($GLOBAL["a"]) triggered GC and destructors calls that tried to release the same global variable $a once again. As result it's reference counter was decremented twice and this caused use-after-free, double-free, etc. The proposed cumulative fix for all related problems: https://gist.github.com/dstogov/7aa9d24876e2b3fce8c5 Xinchen, could you please review and verify this once again, then add necessary tests and commit. Thanks. Dmitry.