3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://maps.google.com/maps/api/geocode/json?address=Bahnhofstra%C3%9Fe+19+Gr%C3%A4fenhainichen&components=country:NL'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 5); $data = curl_exec($ch); // $data = json_decode($data); var_dump($data); if (!curl_errno($ch) && isset($data->status) && ($data->status == 'OK')) { // $latitude = $data->result[0]->geometry->location->lat; // $longitude = $data->result[0]->geometry->location->lng; // if ($dealers = User::findDealersByCoordinates($longitude, $latitude, $country->id)) { // $dealerId = $dealers[0]['dealerID']; // $websiteId = $dealers[0]['websiteID']; // } } else { // Yii::error('Curl request at Google API timeout'); } curl_close($ch);
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/uF9Hq:5 Stack trace: #0 {main} thrown in /in/uF9Hq on line 5
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.38
Fatal error: Call to undefined function curl_init() in /in/uF9Hq on line 5
Process exited with code 255.

preferences:
219.31 ms | 402 KiB | 293 Q