3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function ranger($url){ $headers = array( "Range: bytes=0-32768" ); $curl = curl_init($url); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($curl); curl_close($curl); return $data; } $start = microtime(true); $url = "http://news.softpedia.com/images/news2/Debian-Turns-15-2.jpeg"; $raw = ranger($url); $im = imagecreatefromstring($raw); $width = imagesx($im); $height = imagesy($im); $stop = round(microtime(true) - $start, 5); echo $width." x ".$height." ({$stop}s)";
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/1hW3Q:7 Stack trace: #0 /in/1hW3Q(19): ranger('http://news.sof...') #1 {main} thrown in /in/1hW3Q on line 7
Process exited with code 255.
Output for hhvm-3.12.0
Warning: Empty string or invalid image in /in/1hW3Q on line 20 Warning: imagesx() expects parameter 1 to be resource, boolean given in /in/1hW3Q on line 22 Warning: imagesy() expects parameter 1 to be resource, boolean given in /in/1hW3Q on line 23 x (0.01354s)
Output for hhvm-3.10.0
Warning: Empty string or invalid image in /in/1hW3Q on line 20 Warning: imagesx() expects parameter 1 to be resource, boolean given in /in/1hW3Q on line 22 Warning: imagesy() expects parameter 1 to be resource, boolean given in /in/1hW3Q on line 23 x (0.00451s)
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function curl_init() in /in/1hW3Q on line 7
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: curl_init() in /in/1hW3Q on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: curl_init() in /in/1hW3Q on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: curl_init() in /in/1hW3Q on line 7