3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $accessories = json_decode('{"LARGE ROUND ACOUSTIC ENCLOSURE":{"src":"\/assets\/media\/images\/groups\/accessories\/Large_Round_Acoustic_Enclosure_91900.jpg","alt":"LARGE ROUND ACOUSTIC ENCLOSURE","link":""},"VP8SQ SQUARE ADAPTER W\/ GRILLE (Grille not compatible with legacy models)":{"src":"\/assets\/media\/images\/groups\/accessories\/Square_Adapter_-_Grille.jpg","alt":"VP8SQ SQUARE ADAPTER W\/ GRILLE (Grille not compatible with legacy models)","link":""},"RACK MOUNT EAR KIT FOR 875, 275, 275 X 3, A150, A800, SUB 10-250 & 12-500 AMPS":{"src":"\/assets\/media\/images\/groups\/accessories\/Amp_Rack_Ears.jpg","alt":"RACK MOUNT EAR KIT FOR 875, 275, 275 X 3, A150, A800, SUB 10-250 & 12-500 AMPS","link":""}}'); foreach( $accessories AS $key => $value ) { $udpateAccessories[] = array($key => $value); } echo(json_encode($udpateAccessories));
Output for 5.2.0 - 7.1.0
[{"LARGE ROUND ACOUSTIC ENCLOSURE":{"src":"\/assets\/media\/images\/groups\/accessories\/Large_Round_Acoustic_Enclosure_91900.jpg","alt":"LARGE ROUND ACOUSTIC ENCLOSURE","link":""}},{"VP8SQ SQUARE ADAPTER W\/ GRILLE (Grille not compatible with legacy models)":{"src":"\/assets\/media\/images\/groups\/accessories\/Square_Adapter_-_Grille.jpg","alt":"VP8SQ SQUARE ADAPTER W\/ GRILLE (Grille not compatible with legacy models)","link":""}},{"RACK MOUNT EAR KIT FOR 875, 275, 275 X 3, A150, A800, SUB 10-250 & 12-500 AMPS":{"src":"\/assets\/media\/images\/groups\/accessories\/Amp_Rack_Ears.jpg","alt":"RACK MOUNT EAR KIT FOR 875, 275, 275 X 3, A150, A800, SUB 10-250 & 12-500 AMPS","link":""}}]
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/WjbiM on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/WjbiM on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/WjbiM on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/WjbiM on line 3