3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $infos = [ [ 'activity_type' => 'Professions Libérales', 'speciality' => [ [ 'name' => 'K1', 'position' => 0, ], [ 'name' => 'F1', 'position' => 10, ], [ 'name' => 'K4', 'position' => 20, ], [ 'name' => 'C2', 'position' => 30, ], ] ], [ 'activity_type' => 'Hôpitaux', 'speciality' => [ [ 'name' => 'K1', 'position' => 0, ], [ 'name' => 'F1', 'position' => 10, ], [ 'name' => 'K4', 'position' => 20, ], [ 'name' => 'C2', 'position' => 30, ], ] ] ]; echo json_encode($infos, JSON_PRETTY_PRINT);
Output for 5.6.38 - 7.3.0rc3
[ { "activity_type": "Professions Lib\u00e9rales", "speciality": [ { "name": "K1", "position": 0 }, { "name": "F1", "position": 10 }, { "name": "K4", "position": 20 }, { "name": "C2", "position": 30 } ] }, { "activity_type": "H\u00f4pitaux", "speciality": [ { "name": "K1", "position": 0 }, { "name": "F1", "position": 10 }, { "name": "K4", "position": 20 }, { "name": "C2", "position": 30 } ] } ]