Home > PHP > Function > PHP Options/Info > memory_get_peak_usage()

memory_get_peak_usage()

memory_get_peak_usage - Returns the peak of memory allocated by PHP

Syntax

int memory_get_peak_usage (bool $real_usage)

Arguments

  • real_usage - Set this to TRUE to get the real size of memory allocated from system. If not set or FALSE only the memory used by emalloc()is reported.

Description

Returns the peak of memory, in bytes, that's been allocated to your PHP script.

Version

PHP 5.2.0

Return value

Returns the memory peak in bytes.