3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php # Create a connection $url = 'https://graph.facebook.com'; $ch = curl_init($url); # Form data string $postString = http_build_query($data, '', '&'); # Setting our options curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postString); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); # Get the response $response = curl_exec($ch); curl_close($ch);
Output for 7.0.0 - 7.3.0alpha1
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/DqYZP:5 Stack trace: #0 {main} thrown in /in/DqYZP on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Notice: Undefined variable: data in /in/DqYZP on line 7 Warning: Invalid argument: formdata: (need Array or Object) in /in/DqYZP on line 7
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function curl_init() in /in/DqYZP on line 5
Process exited with code 255.