$time_start = microtime(true); $callYourFunction(); $bar = 'Total execution time in seconds: ' . (microtime(true) - $time_start);