Home > Backend Development > PHP Tutorial > php基础学习- 一些废弃的用法封锁提高性能

php基础学习- 一些废弃的用法封锁提高性能

WBOY
Release: 2016-06-13 13:10:45
Original
813 people have browsed it

php基础学习-- 一些废弃的用法关闭提高性能

php的register_long_arrays可以关闭以提高性能

由于$HTTP_*_VARS这种变量已经过时,PHP手册中明确表示反对使用,因此如果程序中还有这类变量建议更改为新的PHP 超全局变量。
$HTTP_GET_VARS -> $_GET
$HTTP_POST_VARS -> $_POST
$HTTP_COOKIE_VARS??-> $_COOKIE
$HTTP_POST_FILES -> $_POST

我的PHP探针中使用了memory_get_usage来获取当前页面所占用的内存,于是就用运行PHP探针测试了一下,也发现了关闭后占用的内存有轻微的减少。本机探针143.30 -> 142.01,瑞豪开源VPS的探针52.82 -> 52.55,单位KB。

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template