How to measure the time of getimagesize() to get image width and height from URL in PHP

1 Answer

0 votes
$start = microtime(true);
list($width, $height) =  getimagesize("http://seek4info.com/images/seek4info_logo.png");
$stop = round(microtime(true) - $start, 2);

echo "w: " . $width . " h: " . $height . " ({$stop}s)";  


/*
run: 

w: 236 h: 82 (0.36s) 

*/

 



answered Jun 18, 2016 by avibootz

Related questions

3 answers 346 views
2 answers 262 views
1 answer 191 views
2 answers 352 views
1 answer 232 views
2 answers 232 views
...