Home >Backend Development >PHP Tutorial >PHP unset鍏ㄥ眬鍙橀噺杩愮椤邂璇﹁В_PHP鏁欑▼ | 宁涔嫔

PHP unset鍏ㄥ眬鍙橀噺杩愮椤邂璇﹁В_PHP鏁欑▼ | 宁涔嫔

WBOY
WBOYOriginal
2016-07-15 13:34:211228browse

PHP 涓湁涓喷鏀怕彉彉忕殑璇彞鍙仛unset锛堜粠PHP4Liaoset "簬鏄妸unset闂鍐粨沨濡备笅銆傚鏋沧偍浠旂粏闃呰杩嘝HP鐨勬坠鍐岋紝閭榅箞箰箞篬鏂囩珷浜嗭紝杩欑瘒鏂囩珷鏄启缁欑湅鎵嫔唽涓敤蹇幂殑鍚屽鐨勩€?/p>

<ol class="dp-xml"><li class="alt">
<span class="tag"><</span> ?PHP  </li><li><span>function destroy_foo() {  </span></li><li class="alt"><span>global $foo;  </span></li><li><span>unset($foo);  </span></li><li class="alt"><span>}  </span></li><li><span>$</span><span class="attribute">foo</span><span> = &lsquo;bar&rsquo;;  </span></li><li class="alt"><span>destroy_foo();  </span></li><li><span>echo $foo;  </span></li><li class="alt"><span class="tag">?></span><span> </span>
</li></ol>

杩斿洖鐨勭粨鏋滀负

涓轰粈涔堜细杩欐牱鍛紵鍘熷洜皓辨槸PHP unset鍏ㄥ眬鍙橀噺鍦ㄥ嚱鏁授予腑鍙兘閿€姣佸眜? The

<ol class="dp-xml"><li class="alt">
<span class="tag"><</span> ?PHP  </li><li><span>function foo() {  </span></li><li class="alt"><span>unset($GLOBALS['bar']);  </span></li><li><span>}  </span></li><li class="alt"><span>$</span><span class="attribute">bar</span><span> = &ldquo;something&rdquo;;  </span></li><li><span>foo();  </span></li><li class="alt"><span>var_dump($bar);  </span></li><li><span class="tag">?></span><span> </span>
</li></ol>


http://www.bkjia.com/PHPjc/445986.html

www.bkjia.com

http: //www.bkjia.com/PHPjc/445986.htmlTechArticlePHP 涓湁涓喷鏀恐惧彉忕殑璇彞鍙仛4unset锜寮€濮媢nset宸茬粡涓嶅啀鏄竴涓嚱鏁颁簡锛岃€屾槸涓€涓鍙ワ級锛屽墠鍑犲ぉ鐢╱nset鐨勬椂鍊欏嚭浜嗙偣闂锛屼簬鏄妸unset闂?..
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn