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][legs][distance][value]; var_dump($distance);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Undefined constant "routes" in /in/kAFLV:30 Stack trace: #0 {main} thrown in /in/kAFLV on line 30
Process exited with code 255.

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