Last active
December 12, 2020 22:01
-
-
Save peerasan/53de5498f10fb368041a52e6df7187eb to your computer and use it in GitHub Desktop.
php performance quick test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$time = microtime(); | |
$time = explode(' ', $time); | |
$time = $time[1] + $time[0]; | |
$start = $time; | |
for ($i=0 ; $i<1000000 ; $i++) { | |
serialize($list); | |
} | |
$time = microtime(); | |
$time = explode(' ', $time); | |
$time = $time[1] + $time[0]; | |
$finish = $time; | |
$total_time = round(($finish - $start), 4); | |
echo '<p style="font-family:verdana;font-size:90%;color:black">'; | |
echo 'Page generated in '.$total_time.' seconds.'; | |
echo '</p>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment