3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data='{"multicast_id":7917175795873320166,"success":6,"failure":0,"canonical_ids":4, "results":[ {"registration_id":"3","message_id":"m1"}, {"message_id":"m1"}, {"message_id":"m1"}, {"registration_id":"3","message_id":"m1"}, {"registration_id":"3","message_id":"m1"}, {"registration_id":"3","message_id":"m1"}]}'; $newData=json_decode($data); $filteredResults = array_filter($newData->results, function($item) { return isset($item['registration_id']; }); print_r($filteredResults);
Output for 5.3.0 - 5.4.24
Parse error: syntax error, unexpected ';', expecting ',' or ')' in /in/BcJT8 on line 18
Process exited with code 255.