Skip to content

Instantly share code, notes, and snippets.

@peerasan
Last active December 12, 2020 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peerasan/53de5498f10fb368041a52e6df7187eb to your computer and use it in GitHub Desktop.
Save peerasan/53de5498f10fb368041a52e6df7187eb to your computer and use it in GitHub Desktop.
php performance quick test
<?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