3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = '[{"lat":-2.1581795660883976,"lng":-79.90096002817154},{"lat":-2.171559596852916,"lng":-79.9018183350563},{"lat":-2.176448424731824,"lng":-79.89057451486588},{"lat":-2.1662419064644722,"lng":-79.88053232431412},{"lat":-2.156206859267206,"lng":-79.8930636048317},{"lat":-2.15835110569104,"lng":-79.90164667367935}]'; var_dump(json_decode($str));
Output for 5.2.0 - 7.2.6
array(6) { [0]=> object(stdClass)#1 (2) { ["lat"]=> float(-2.1581795660884) ["lng"]=> float(-79.900960028172) } [1]=> object(stdClass)#2 (2) { ["lat"]=> float(-2.1715595968529) ["lng"]=> float(-79.901818335056) } [2]=> object(stdClass)#3 (2) { ["lat"]=> float(-2.1764484247318) ["lng"]=> float(-79.890574514866) } [3]=> object(stdClass)#4 (2) { ["lat"]=> float(-2.1662419064645) ["lng"]=> float(-79.880532324314) } [4]=> object(stdClass)#5 (2) { ["lat"]=> float(-2.1562068592672) ["lng"]=> float(-79.893063604832) } [5]=> object(stdClass)#6 (2) { ["lat"]=> float(-2.158351105691) ["lng"]=> float(-79.901646673679) } }
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/67681 on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/67681 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/67681 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/67681 on line 5