Description
int
memory_get_usage ( void )
Returns the amount of memory, in bytes, that's currently being
allocated to your PHP script.
memory_get_usage() will only be defined if your PHP
is compiled with the --enable-memory-limit
configuration option.
Example 1. A memory_get_usage() example |
<?php
echo memory_get_usage() . "\n"; $a = str_repeat("Hello", 4242);
echo memory_get_usage() . "\n"; unset($a);
echo memory_get_usage() . "\n"; ?>
|
|
See also
memory_limit.