To get the amount of free memory available on the system in PHP, you can use the memory_get_usage()
function. This function returns the amount of memory used by PHP at the moment of its call.
main.php38 chars2 lines
The parameter true
instructs the function to return the amount of free memory available to PHP.
Note that this value represents the amount of memory that PHP can use, but not necessarily the total amount of free memory on the system.
gistlibby LogSnag