3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<? $ip = "192.168.1.1"; $port = "80"; $curl = curl_init(); CURL_SETOPT($curl,CURLOPT_URL,"http://google.fr"); CURL_SETOPT($curl,CURLOPT_PROXY,$ip.":".$port); CURL_SETOPT($curl,CURLOPT_PROXYTYPE,CURLPROXY_HTTP); CURL_SETOPT($curl,CURLOPT_TIMEOUT,20); CURL_SETOPT($curl,CURLOPT_RETURNTRANSFER,True); CURL_SETOPT($curl,CURLOPT_FOLLOWLOCATION,True); curl_exec($curl); curl_close($curl); ?>
based on 0pSuA
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/YCKEU:4 Stack trace: #0 {main} thrown in /in/YCKEU on line 4
Process exited with code 255.
Output for 5.4.12 - 5.6.21
Fatal error: Call to undefined function curl_init() in /in/YCKEU on line 4
Process exited with code 255.
Output for 5.3.22 - 5.3.29
<? $ip = "192.168.1.1"; $port = "80"; $curl = curl_init(); CURL_SETOPT($curl,CURLOPT_URL,"http://google.fr"); CURL_SETOPT($curl,CURLOPT_PROXY,$ip.":".$port); CURL_SETOPT($curl,CURLOPT_PROXYTYPE,CURLPROXY_HTTP); CURL_SETOPT($curl,CURLOPT_TIMEOUT,20); CURL_SETOPT($curl,CURLOPT_RETURNTRANSFER,True); CURL_SETOPT($curl,CURLOPT_FOLLOWLOCATION,True); curl_exec($curl); curl_close($curl); ?>