【PHP之引用计数】
参考:http://php.net/manual/zh/features.gc.refcounting-basics.php
参考II: http://blog.xiuwz.com/2011/11/09/php-using-internal-zval/
写得挺详细。