PHP也可以检测获取到Windows的内存信息,而且代码还挺简单,无意发现的,觉得以后能用上,在此与大家分享。
本代码将得到总内存、初始使用等内存信息:
01
02echo "初始: ".memory_get_usage()." 字节 \n";
03for ($i = 0; $i
04 $array []= md5($i);
05}
06for ($i = 0; $i
07 unset($array[$i]);
08}
09echo "最终: ".memory_get_usage()." 字节 \n";
10echo "内存总量: ".memory_get_peak_usage()." 字节 \n";
11?>
运行结果示例:
初始: 66104 字节 最终: 590600 字节 内存总量: 12591704 字节

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version
Visual web development tools

Atom editor mac version download
The most popular open source editor