3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "http://maps.googleapis.com/maps/api/distancematrix/json?origins=Bangu+RJ&destinations=Centro+RJ&mode=driving&language=pt-BR&sensor=false"; $json = file_get_contents($url); $data = json_decode($json); print $data->elements->distance->{'text'}; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for maps.googleapis.com failed: System error in /in/h71ms on line 5 Warning: file_get_contents(http://maps.googleapis.com/maps/api/distancematrix/json?origins=Bangu+RJ&destinations=Centro+RJ&mode=driving&language=pt-BR&sensor=false): Failed to open stream: php_network_getaddresses: getaddrinfo for maps.googleapis.com failed: System error in /in/h71ms on line 5 Warning: Attempt to read property "elements" on null in /in/h71ms on line 8 Warning: Attempt to read property "distance" on null in /in/h71ms on line 8 Warning: Attempt to read property "text" on null in /in/h71ms on line 8

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
48.37 ms | 402 KiB | 8 Q