Who is using PHP memory management?

Source: Internet
Author: User
First, let's look at the problem: the output of the following code: var_dump (memory_get_usage (); $ alaruence; var_dump (memory_get_usage (); unset ($ ); var_dump (memory_get_usage (); output (on my PC, the loaded extensions may vary depending on the system and PHP version): int (90440) int (90640) int

First, let's look at the problem: the output of the following code: var_dump (memory_get_usage (); $ a = "laruence"; var_dump (memory_get_usage (); unset ($ ); var_dump (memory_get_usage (); output (on my PC, the loaded extensions may vary depending on the system and PHP version): int (90440) int (90640) int

First, let's look at the problem: the output of the following code: var_dump (memory_get_usage (); $ a = "laruence"; var_dump (memory_get_usage (); unset ($ ); var_dump (memory_get_usage (); output (on my PC, the loaded extensions may vary depending on the system and PHP version): int (90440) int (90640) int (90472) noticed that 90472-90440 = 32, so I came to various conclusions. Some people say that PHP's unset does not actually release the memory, and some say, PHP unset is only releasing large variables (a large number of characters...

Original article address: I have a deep understanding of who has moved my memory in PHP memory management. I would like to thank the original author for sharing this article.

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.