PHP can also detect access to Windows memory information, and the code is quite simple, no intention to find, think later can be used, here to share with you.
This code will get the total memory, initial use and other memory information:
01
02echo "initial:". Memory_get_usage (). "Byte \ n";
03for ($i = 0; $i < 100000; $i + +) {
$array []= MD5 ($i);
05}
06for ($i = 0; $i < 100000; $i + +) {
Unset ($array [$i]);
08}
09echo "Final:". Memory_get_usage (). "Byte \ n";
10echo "Total Memory:". Memory_get_peak_usage (). "Byte \ n";
11?>
Examples of running results:
Initial: 66104 bytes final: 590600 bytes total Memory: 12591704 bytes
http://www.bkjia.com/PHPjc/755617.html www.bkjia.com true http://www.bkjia.com/PHPjc/755617.html techarticle PHP can also detect access to Windows memory information, and the code is quite simple, no intention to find, think later can be used, here to share with you. This code will get total memory, initial ...