3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php header("Content-type: application/json"); $url = "http://ipinfo.io/" . $_SERVER['REMOTE_ADDR'] . "/json"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url ); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); print json_encode($output); ?>
Output for 7.0.0 - 7.2.0
Notice: Undefined index: REMOTE_ADDR in /in/aSihQ on line 3 Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/aSihQ:4 Stack trace: #0 {main} thrown in /in/aSihQ on line 4
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Notice: Undefined index: REMOTE_ADDR in /in/aSihQ on line 3 Fatal error: Call to undefined function curl_init() in /in/aSihQ on line 4
Process exited with code 255.