3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $content = file_get_contents("http://adrenta.com/json/platform/getmap"); $data = json_decode($content, true); $result = array(); foreach($data['items'] as $key => $value) { $result[] = array('name' => $value['name'], 'street' => $value['street'], 'lat' => $value['lat'], 'lng' => $value['lng']); } echo json_encode($result);
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc3
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/NjGol on line 3 Warning: file_get_contents(http://adrenta.com/json/platform/getmap): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/NjGol on line 3 Warning: Invalid argument supplied for foreach() in /in/NjGol on line 8 []
Output for hhvm-3.15.4
Warning: Failed to open http://adrenta.com/json/platform/getmap (Could not resolve host: adrenta.com) in /in/NjGol on line 3 Warning: Invalid argument supplied for foreach() in /in/NjGol on line 10 []