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 :: start server symfony command 
Php :: php curl delete request 
Php :: take files from one folder and move to another folder in php 
Php :: auth pages not getting css in laravel 
Php :: carbon add minutes 
Php :: php http build query 
Php :: uninstall php 8.0 ubuntu 
Php :: php mkdir if not exists 
Php :: current time in laravel migration 
Php :: generate random number of 4 digit in php 
Php :: carbon minus 1 day 
Php :: php max_execution_time 
Php :: php file_get_contents url 
Php :: php float 2 decimais 
Php :: wordpress stop redirect to https 
Php :: php json_encode encode not escape forward slash 
Php :: get url php 
Php :: switch case php 
Php :: php get method name 
Php :: phpMyAdmin is not able to cache templates 
Php :: default port for laravel 
Php :: carbon day 30 days ago 
Php :: php sql connection string 
Php :: usleep php 
Php :: get request uri from request laravel 7 
Php :: yii2 redirect back 
Php :: witherrors laravel 
Php :: seed date laravel 
Php :: remove gutenberg styles 
Php :: laravel route list only api 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =