Using PHP, I\'d like to get the total memory available to the system (not just the free or used memory).
On Linux it\'s quite straight forward. You can do:
This is a minor (and possibly more suitable for SuperUser) distinction, but as it's come up for me in a recent windows service, I'll provide it here. The question asks about available memory, not total physical memory.
exec('wmic OS get FreePhysicalMemory /Value 2>&1', $output, $return);
$memory = substr($output[2],19);
echo $memory;