Function __global->memory_get_peak_usage

Definitions

sources_custom/phpstub.php

  • Returns the amount of memory allocated to PHP at peak.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$real_usage boolean No No False N/A N/A Get total memory allocated, including unused pages

Returns

  • The amount of memory, in bytes, at peak
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Returns the amount of memory allocated to PHP at peak.
 *
 * @param  boolean $real_usage Get total memory allocated, including unused pages
 * @return integer The amount of memory, in bytes, at peak
 */

function memory_get_peak_usage(bool $real_usage = false) : int