Answers for "calculate time in php"

PHP
3

time php

<?php 
/* Unix Timestamp */
$timestamp = time();
echo $timestamp . "<br>";
echo date("d/m/Y", $timestamp);
?>
Posted by: Guest on October-06-2020
2

php time

<?php
$t=time();
echo($t . "<br>");
echo(date("Y-m-d",$t));
?>
Posted by: Guest on June-24-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

Code answers related to "calculate time in php"

Browse Popular Code Answers by Language