3v4l.org

run code in 300+ PHP versions simultaneously
<?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; }
Output for git.master, git.master_jit, rfc.property-hooks
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.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.81 ms | 401 KiB | 8 Q