3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $post=array ( 'data' => '[{"page":{"identifierInteraction":"caf4282eaa1e9c79722baae95e7837b2","path":"game_form","identifierDevice":"B50E28DF-9C10-46B0-999C-11297122026C","hour":"16:40:23","date":"2013-12-02"}},{"page":{"identifierInteraction":"caf4282eaa1e9c79722baae95e7837b2","path":"game_slotmachine","identifierDevice":"B50E28DF-9C10-46B0-999C-11297122026C","hour":"16:41:22","date":"2013-12-02"}},{"page":{"identifierInteraction":"caf4282eaa1e9c79722baae95e7837b2","path":"game_win","identifierDevice":"B50E28DF-9C10-46B0-999C-11297122026C","hour":"16:41:31","date":"2013-12-02"}},{"page":{"identifierInteraction":"caf4282eaa1e9c79722baae95e7837b2","path":"game_end","identifierDevice":"B50E28DF-9C10-46B0-999C-11297122026C","hour":"16:41:46","date":"2013-12-02"}},{"page":{"identifierInteraction":"537545ab89d9747a8ca1765fb8f9d449","path":"game_form","identifierDevice":"B50E28DF-9C10-46B0-999C-11297122026C","hour":"17:05:36","date":"2013-12-02"}},{"page":{"identifierInteraction":"537545ab89d9747a8ca1765fb8f9d449","path":"game_slotmachine","identifierDevice":"B50E28DF-9C10-46B0-999C-11297122026C","hour":"17:06:45","date":"2013-12-02"}},{"page":{"identifierInteraction":"537545ab89d9747a8ca1765fb8f9d449","path":"game_loose","identifierDevice":"B50E28DF-9C10-46B0-999C-11297122026C","hour":"17:06:58","date":"2013-12-02"}},{"page":{"identifierInteraction":"537545ab89d9747a8ca1765fb8f9d449","path":"game_end","identifierDevice":"B50E28DF-9C10-46B0-999C-11297122026C","hour":"17:07:04","date":"2013-12-02"}},{"page":{"identifierInteraction":"dc457cd9ef26bb2a7f3ab40ac5530307","path":"game_form","identifierDevice":"B50E28DF-9C10-46B0-999C-11297122026C","hour":"17:24:08","date":"2013-12-02"}},{"page":{"identifierInteraction":"6a1d6939637e018a0da753708d2387f5","path":"game_form","identifierDevice":"B50E28DF-9C10-46B0-999C-11297122026C","hour":"08:55:09","date":"2013-12-03"}}]', ); $data = $post['data']; if(!is_array($data)) { $data = json_decode($data, true); echo "json decode done"; } var_dump($data); foreach ($data as $information) { print_r($information); }
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
json decode donearray(10) { [0]=> array(1) { ["page"]=> array(5) { ["identifierInteraction"]=> string(32) "caf4282eaa1e9c79722baae95e7837b2" ["path"]=> string(9) "game_form" ["identifierDevice"]=> string(36) "B50E28DF-9C10-46B0-999C-11297122026C" ["hour"]=> string(8) "16:40:23" ["date"]=> string(10) "2013-12-02" } } [1]=> array(1) { ["page"]=> array(5) { ["identifierInteraction"]=> string(32) "caf4282eaa1e9c79722baae95e7837b2" ["path"]=> string(16) "game_slotmachine" ["identifierDevice"]=> string(36) "B50E28DF-9C10-46B0-999C-11297122026C" ["hour"]=> string(8) "16:41:22" ["date"]=> string(10) "2013-12-02" } } [2]=> array(1) { ["page"]=> array(5) { ["identifierInteraction"]=> string(32) "caf4282eaa1e9c79722baae95e7837b2" ["path"]=> string(8) "game_win" ["identifierDevice"]=> string(36) "B50E28DF-9C10-46B0-999C-11297122026C" ["hour"]=> string(8) "16:41:31" ["date"]=> string(10) "2013-12-02" } } [3]=> array(1) { ["page"]=> array(5) { ["identifierInteraction"]=> string(32) "caf4282eaa1e9c79722baae95e7837b2" ["path"]=> string(8) "game_end" ["identifierDevice"]=> string(36) "B50E28DF-9C10-46B0-999C-11297122026C" ["hour"]=> string(8) "16:41:46" ["date"]=> string(10) "2013-12-02" } } [4]=> array(1) { ["page"]=> array(5) { ["identifierInteraction"]=> string(32) "537545ab89d9747a8ca1765fb8f9d449" ["path"]=> string(9) "game_form" ["identifierDevice"]=> string(36) "B50E28DF-9C10-46B0-999C-11297122026C" ["hour"]=> string(8) "17:05:36" ["date"]=> string(10) "2013-12-02" } } [5]=> array(1) { ["page"]=> array(5) { ["identifierInteraction"]=> string(32) "537545ab89d9747a8ca1765fb8f9d449" ["path"]=> string(16) "game_slotmachine" ["identifierDevice"]=> string(36) "B50E28DF-9C10-46B0-999C-11297122026C" ["hour"]=> string(8) "17:06:45" ["date"]=> string(10) "2013-12-02" } } [6]=> array(1) { ["page"]=> array(5) { ["identifierInteraction"]=> string(32) "537545ab89d9747a8ca1765fb8f9d449" ["path"]=> string(10) "game_loose" ["identifierDevice"]=> string(36) "B50E28DF-9C10-46B0-999C-11297122026C" ["hour"]=> string(8) "17:06:58" ["date"]=> string(10) "2013-12-02" } } [7]=> array(1) { ["page"]=> array(5) { ["identifierInteraction"]=> string(32) "537545ab89d9747a8ca1765fb8f9d449" ["path"]=> string(8) "game_end" ["identifierDevice"]=> string(36) "B50E28DF-9C10-46B0-999C-11297122026C" ["hour"]=> string(8) "17:07:04" ["date"]=> string(10) "2013-12-02" } } [8]=> array(1) { ["page"]=> array(5) { ["identifierInteraction"]=> string(32) "dc457cd9ef26bb2a7f3ab40ac5530307" ["path"]=> string(9) "game_form" ["identifierDevice"]=> string(36) "B50E28DF-9C10-46B0-999C-11297122026C" ["hour"]=> string(8) "17:24:08" ["date"]=> string(10) "2013-12-02" } } [9]=> array(1) { ["page"]=> array(5) { ["identifierInteraction"]=> string(32) "6a1d6939637e018a0da753708d2387f5" ["path"]=> string(9) "game_form" ["identifierDevice"]=> string(36) "B50E28DF-9C10-46B0-999C-11297122026C" ["hour"]=> string(8) "08:55:09" ["date"]=> string(10) "2013-12-03" } } } Array ( [page] => Array ( [identifierInteraction] => caf4282eaa1e9c79722baae95e7837b2 [path] => game_form [identifierDevice] => B50E28DF-9C10-46B0-999C-11297122026C [hour] => 16:40:23 [date] => 2013-12-02 ) ) Array ( [page] => Array ( [identifierInteraction] => caf4282eaa1e9c79722baae95e7837b2 [path] => game_slotmachine [identifierDevice] => B50E28DF-9C10-46B0-999C-11297122026C [hour] => 16:41:22 [date] => 2013-12-02 ) ) Array ( [page] => Array ( [identifierInteraction] => caf4282eaa1e9c79722baae95e7837b2 [path] => game_win [identifierDevice] => B50E28DF-9C10-46B0-999C-11297122026C [hour] => 16:41:31 [date] => 2013-12-02 ) ) Array ( [page] => Array ( [identifierInteraction] => caf4282eaa1e9c79722baae95e7837b2 [path] => game_end [identifierDevice] => B50E28DF-9C10-46B0-999C-11297122026C [hour] => 16:41:46 [date] => 2013-12-02 ) ) Array ( [page] => Array ( [identifierInteraction] => 537545ab89d9747a8ca1765fb8f9d449 [path] => game_form [identifierDevice] => B50E28DF-9C10-46B0-999C-11297122026C [hour] => 17:05:36 [date] => 2013-12-02 ) ) Array ( [page] => Array ( [identifierInteraction] => 537545ab89d9747a8ca1765fb8f9d449 [path] => game_slotmachine [identifierDevice] => B50E28DF-9C10-46B0-999C-11297122026C [hour] => 17:06:45 [date] => 2013-12-02 ) ) Array ( [page] => Array ( [identifierInteraction] => 537545ab89d9747a8ca1765fb8f9d449 [path] => game_loose [identifierDevice] => B50E28DF-9C10-46B0-999C-11297122026C [hour] => 17:06:58 [date] => 2013-12-02 ) ) Array ( [page] => Array ( [identifierInteraction] => 537545ab89d9747a8ca1765fb8f9d449 [path] => game_end [identifierDevice] => B50E28DF-9C10-46B0-999C-11297122026C [hour] => 17:07:04 [date] => 2013-12-02 ) ) Array ( [page] => Array ( [identifierInteraction] => dc457cd9ef26bb2a7f3ab40ac5530307 [path] => game_form [identifierDevice] => B50E28DF-9C10-46B0-999C-11297122026C [hour] => 17:24:08 [date] => 2013-12-02 ) ) Array ( [page] => Array ( [identifierInteraction] => 6a1d6939637e018a0da753708d2387f5 [path] => game_form [identifierDevice] => B50E28DF-9C10-46B0-999C-11297122026C [hour] => 08:55:09 [date] => 2013-12-03 ) )
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/Pc3bG on line 11
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/Pc3bG on line 11
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/Pc3bG on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/Pc3bG on line 11