3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if(is_callable('curl_init')){ echo "Enabled"; } else { echo "Not enabled"; } $url = "https://www.google.com"; echo $url; $response = getPriceFromFlipkart($url); echo $response; function getPriceFromFlipkart($url) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 10.10; labnol;) 3v4l.org"); curl_setopt($curl, CURLOPT_FAILONERROR, true); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $html = curl_exec($curl); curl_close($curl); return $html; }
based on VKruW
Output for 7.0.0 - 7.2.0
Not enabledhttps://www.google.com Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/9t4Vd:19 Stack trace: #0 /in/9t4Vd(13): getPriceFromFlipkart('https://www.goo...') #1 {main} thrown in /in/9t4Vd on line 19
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Not enabledhttps://www.google.com Fatal error: Call to undefined function curl_init() in /in/9t4Vd on line 19
Process exited with code 255.