Search
 
SCRIPT & CODE EXAMPLE
 

PHP

page load time in php

$starttime = microtime(true); // Top of page

// Code

$endtime = microtime(true); // Bottom of page

$time_taken =($endtime - $starttime)*1000;
$time_taken = round($time_taken,5); // 5 is nothing but Precision

print("Page loaded in seconds", $time_taken );
Comment

time to load php page

//Put this code at beginning of your page:
<?php $start_time = microtime(true); ?>
   
//Put this code at the end of your page:
This page was generated in <?php echo(number_format(microtime(true) - $start_time, 2)); ?> seconds.
Comment

PREVIOUS NEXT
Code Example
Php :: php date timestamp now 
Php :: laravel send back with message 
Php :: php mysql datetime 
Php :: Install ext-dom php 7.2 
Php :: php force array keys to lowercase 
Php :: Download a file from external server using PHP - Move one project to another server 
Php :: laravel between dates 
Php :: E: Unable to locate package php7.2-mbstring 
Php :: create laravel project old version 
Php :: php date + 1 year 
Php :: check table exists in db laravel 
Php :: php remove everything after character 
Php :: take 10 character from string using php 
Php :: - root composer.json requires php ^7.1.3 but your php version (8.0.3) does not satisfy that requirement. 
Php :: asia time zone in php 
Php :: laravel assign active based on route name 
Php :: php array_merge 
Php :: php get location from ip address 
Php :: laravel validation unique email 
Php :: php to save txt html 
Php :: phpmyadmin change database import size 
Php :: php to string 
Php :: collection laravel filter 
Php :: laravel throw exception with status code 
Php :: laravel get last 5 records 
Php :: php sleep half a second 
Php :: get domain from url cakephp 
Php :: laravel print exception message 
Php :: getting values from url php 
Php :: how to take last entry in database in laravel Method Three 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =