php time how long a function takes
snippet in php

php time how long a function takes

user8775

<?php
$startTime = microtime(true);

/*stuff is going on*/

echo "Elapsed time is: ". (microtime(true) - $startTime) ." seconds";