3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = ' { "routes": [ { "bounds": { "northeast": { "lat": 41.9291739, "lng": 23.7293099 }, "southwest": { "lat": 37.9103506, "lng": 12.4822041 } }, "copyrights": "Map data,google", "legs": [ { "distance": { "text": "1,250 km", "value": 1249958 } } ] } ] } '; $json = json_decode($str); $distance = $json->routes[0]->legs[0]->distance->value; var_dump($distance);
Output for git.master, git.master_jit, rfc.property-hooks
int(1249958)

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:
59.56 ms | 401 KiB | 8 Q