Answers for "time count hour php"

PHP
1

how to add hour minute seconds in php datetime

date('Y-m-d H:i',strtotime('+1 hour +20 minutes',strtotime($start)));
Posted by: Guest on August-13-2020
0

calculate time php

//Calculate the execution time in PHP

<?php 
  
// Start the clock time in seconds 
$start_time = microtime(true); 
$val=1; 
  
// Start loop 
for($i = 1; $i <=99999; $i++) 
{ 
    $val++; 
}  
  
// End the clock time in seconds 
$end_time = microtime(true); 
  
// Calculate the script execution time 
$execution_time = ($end_time - $start_time); 
  
echo " It takes ".$execution_time." seconds to execute the script"; 
?>
Posted by: Guest on June-27-2021

Browse Popular Code Answers by Language