# memory_get_usage — Возвращает количество памяти выделенной PHP echo memory_get_usage(); # http://php.net/manual/ru/function.memory-get-usage.php