3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $json = '{ "results" : [ { "address_components" : [ { "long_name" : "Cebu City", "short_name" : "Cebu City", "types" : [ "locality", "political" ] }, { "long_name" : "Cebu", "short_name" : "Cebu", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Central Visayas", "short_name" : "Central Visayas", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "Philippines", "short_name" : "PH", "types" : [ "country", "political" ] } ], "formatted_address" : "Cebu City, Cebu, Philippines", "geometry" : { "bounds" : { "northeast" : { "lat" : 10.498277, "lng" : 123.9326476 }, "southwest" : { "lat" : 10.2595799, "lng" : 123.7633896 } }, "location" : { "lat" : 10.3156992, "lng" : 123.8854366 }, "location_type" : "APPROXIMATE", "viewport" : { "northeast" : { "lat" : 10.498277, "lng" : 123.9326476 }, "southwest" : { "lat" : 10.2595799, "lng" : 123.7633896 } } }, "types" : [ "locality", "political" ] } ], "status" : "OK" }' $obj = json_decode($json);
Output for 5.4.0 - 5.4.34
Parse error: syntax error, unexpected '$obj' (T_VARIABLE) in /in/Z4nH5 on line 64
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_VARIABLE in /in/Z4nH5 on line 64
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_VARIABLE in /in/Z4nH5 on line 64
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Z4nH5 on line 64
Process exited with code 255.