PHP绫诲瀷涔嬭祫婧愮被鍨嬩粙缁

PHP绫诲瀷涔嬭祫婧愮被鍨嬶紝璧勬簮鏄竴绉嶇壒娈婂彉閲忥紝淇濆瓨浜嗗埌澶栭儴璧勬簮鐨勪竴涓紩鐢ㄣ傝祫婧愭槸閫氳繃涓撻棬鐨勫嚱鏁版潵寤虹珛鍜屼娇鐢ㄧ殑銆傛墍鏈夎繖浜涘嚱鏁板強鍏剁浉搴旇祫婧愮被鍨嬭闄勫綍銆

璧勬簮绫诲瀷
璧勬簮鏄竴绉嶇壒娈婂彉閲忥紝淇濆瓨浜嗗埌澶栭儴璧勬簮鐨勪竴涓紩鐢ㄣ傝祫婧愭槸閫氳繃涓撻棬鐨勫嚱鏁版潵寤虹珛鍜屼娇鐢ㄧ殑銆傛墍鏈夎繖浜涘嚱鏁板強鍏剁浉搴旇祫婧愮被鍨嬭闄勫綍銆

Note: 璧勬簮绫诲瀷鏄 PHP 4 寮曡繘鐨勩

鍙傝 get_resource_type()銆

杞崲涓鸿祫婧
鐢变簬璧勬簮绫诲瀷鍙橀噺淇濆瓨鏈変负鎵撳紑鏂囦欢銆佹暟鎹簱杩炴帴銆佸浘褰㈢敾甯冨尯鍩熺瓑鐨勭壒娈婂彞鏌勶紝鍥犳灏嗗叾瀹冪被鍨嬬殑鍊艰浆鎹负璧勬簮娌℃湁鎰忎箟銆

閲婃斁璧勬簮
鐢变簬 PHP4 Zend 寮曟搸寮曡繘浜嗗紩鐢ㄨ鏁扮郴缁燂紝鍙互鑷姩妫娴嬪埌涓涓祫婧愪笉鍐嶈寮曠敤浜嗭紙鍜 Java 涓鏍凤級銆傝繖绉嶆儏鍐典笅姝よ祫婧愪娇鐢ㄧ殑鎵鏈夊閮ㄨ祫婧愰兘浼氳鍨冨溇鍥炴敹绯荤粺閲婃斁銆傚洜姝わ紝寰堝皯闇瑕佹墜宸ラ噴鏀惧唴瀛樸 Thanks to the reference-counting system introduced with PHP 4's Zend Engine, a resource with no more references to it is detected automatically, and it is freed by the garbage collector. For this reason, it is rarely necessary to free the memory manually.

Note: 鎸佷箙鏁版嵁搴撹繛鎺ユ瘮杈冪壒娈婏紝瀹冧滑涓嶄細琚瀮鍦惧洖鏀剁郴缁熼攢姣併傚弬瑙佹暟鎹簱姘镐箙杩炴帴涓绔犮

浠ヤ笂灏辨槸PHP绫诲瀷涔嬭祫婧愮被鍨嬩粙缁嶇殑璇︾粏鍐呭锛屾洿澶氫俊鎭鍏虫敞OD浜戝叾瀹冪浉鍏虫枃绔狅紒



鏈枃URL锛http://www.odweb.cn/news_show.html?id=52