Getting memory allocated to your php script

by guruprasad 2014-06-21 11:09:41

To get the memory allocated to our using php script
 
echo memory_get_usage(); 

$a = str_repeat("Testing", 10);

echo memory_get_usage(); 

unset($a);

echo memory_get_usage(); 

 
1245
like
0
dislike
0
mail
flag

You must LOGIN to add comments