php返回101,PHP 101:变量与函数
生活随笔
收集整理的這篇文章主要介紹了
php返回101,PHP 101:变量与函数
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
功能很好.
我看到功能徽標()比$logo更好. echo不占用太多內存,但$logo確實如此.即使函數logo()需要一些東西,它也將由PHP自己的垃圾收集器處理.您還可以使用這些函數來確保不會濫用分配的內存.
> memory_get_peak_usage();
> memory_get_usage();
說明:
Upon the ending of an in use function PHP clears the memory it was using, at least more efficiently than if not using a function. If you are using recursive code or something similar that is memory intensive try putting the code into a function or method, upon closing of the function/method the memory used for the function will be garbaged much more efficiently than that of unsetting variables within the loop itself.
總結
以上是生活随笔為你收集整理的php返回101,PHP 101:变量与函数的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: centos 6 mysql 5.7.1
- 下一篇: css直接子元素怎么用,CSS 子元素选