3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = 'http://vnexpress.net/tin-tuc/phap-luat/15-canh-sat-bi-bat-giu-tai-my-duc-duoc-tha-tu-do-3571959.html'; echo $url."\n"; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,5); //timeout in seconds curl_setopt($ch, CURLOPT_TIMEOUT, 5); //timeout in seconds curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $result = curl_exec($ch); if(curl_exec($ch) === false) { echo 'Curl error: ' . curl_error($ch); } else { var_dump($result); }
Output for 7.0.0 - 7.3.0beta1
http://vnexpress.net/tin-tuc/phap-luat/15-canh-sat-bi-bat-giu-tai-my-duc-duoc-tha-tu-do-3571959.html Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/tvj8Z:4 Stack trace: #0 {main} thrown in /in/tvj8Z on line 4
Process exited with code 255.
Output for hhvm-3.12.14 - 3.17.3
http://vnexpress.net/tin-tuc/phap-luat/15-canh-sat-bi-bat-giu-tai-my-duc-duoc-tha-tu-do-3571959.html Curl error: Could not resolve host: vnexpress.net
Output for 5.6.0 - 5.6.30
http://vnexpress.net/tin-tuc/phap-luat/15-canh-sat-bi-bat-giu-tai-my-duc-duoc-tha-tu-do-3571959.html Fatal error: Call to undefined function curl_init() in /in/tvj8Z on line 4
Process exited with code 255.