3v4l.org

run code in 300+ PHP versions simultaneously
<?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.0.20, 7.1.0 - 7.1.7, 7.2.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 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 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.3.11, 4.4.0 - 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

preferences:
143.04 ms | 401 KiB | 175 Q