PHP unset () detailed

Source: Internet
Author: User
Introduction: This is a detailed page of PHP unset () details, introduced and Php,unset, PHP php unset () detailed knowledge, skills, experience, and some PHP source code and so on.

class= ' pingjiaf ' frameborder= ' 0 ' src= ' http://biancheng.dnbcw.info/pingjia.php?id=361000 ' scrolling= ' no ' > 1. If more than one variable name points to a variable value, unset any one variable name simply disconnects the relationship between the variable name and the variable value, does not free memory, and the value exists
(see 2 for exceptions).
2. Two cases will release memory, otherwise the value of the variable in memory still exists.
A) When the value of the variable takes up more than 256 bytes, the memory is freed by unset () (This is someone's test result, to be explained)
b) When all variables that point to the value (such as a reference variable pointing to the value) are destroyed
3. If you want to release the variable memory, it is best to release it with $a=null, when the null value is assigned, the address is freed, all references to the variable value are empty
4. When a global variable is unset in the local environment, the global variable is only invalidated at the local scope. Unchanged in other places

Love EE focus on Java Michael Jackson Video station JSON online tool

Http://biancheng.dnbcw.info/php/361000.html pageno:1
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.