3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function isFileUrl($url){ $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // don't want it rendered to browser curl_exec($ch); if(curl_errno($ch)){ $isFile = false; } else { $isFile = true; } curl_close($ch); return $isFile; } if(isFileUrl('https://www.google.com/images/srpr/logo4w.png')==true){ echo 'TRUE'; } else { echo 'FALSE'; }
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/Xbkqf:3 Stack trace: #0 /in/Xbkqf(17): isFileUrl('https://www.goo...') #1 {main} thrown in /in/Xbkqf on line 3
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
FALSE
Output for 5.3.28 - 5.3.29, 5.4.20 - 5.6.28
Fatal error: Call to undefined function curl_init() in /in/Xbkqf on line 3
Process exited with code 255.
Output for 5.0.0 - 5.3.27, 5.4.0 - 5.4.19
Fatal error: Call to undefined function curl_init() in /in/JWG3U on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: curl_init() in /in/JWG3U on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: curl_init() in /in/JWG3U on line 3
Process exited with code 255.
Output for 4.3.1
Fatal error: Call to undefined function: curl_init() in /in/JWG3U on line 3
Output for 4.3.0
Fatal error: Call to undefined function: curl_init() in /in/Xbkqf on line 3