- memory_get_peak_usage: documentation ( source)
- range: documentation ( source)
<?php
$variable = range(1, 1000);
echo memory_get_peak_usage(true), PHP_EOL;
function foo(&$var) {
return bar($var);
}
function bar($var) {
return is_array($var);
}
foo($variable);
echo memory_get_peak_usage(true);