function memory_get_usage

 
<?php
 
function memoryChecker($variable) {
echo 'in function: '.memory_get_usage()."\n";
}
 
echo 'before function: '.memory_get_usage()."\n";
 
$var = "hello world\n";
 
memoryChecker($var);

Leave a Reply