3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = json_encode(array ( 0 => array ( 'RoomDimensions' => '15X12', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Upper', 'RoomType' => '2nd Bedroom', 'RoomWindowTreatments' => '1', ), 1 => array ( 'RoomDimensions' => '13X12', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Upper', 'RoomType' => '3rd Bedroom', 'RoomWindowTreatments' => '1', ), 2 => array ( 'RoomDimensions' => '13X13', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Upper', 'RoomType' => '4th Bedroom', 'RoomWindowTreatments' => '1', ), 3 => array ( 'RoomDimensions' => '12X10', 'RoomFloors' => 'Hardwood', 'RoomLevel' => 'Main', 'RoomType' => 'Breakfast Room', 'RoomWindowTreatments' => '1', ), 4 => array ( 'RoomDimensions' => '15X13', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Main', 'RoomType' => 'Dining Room', 'RoomWindowTreatments' => '1', ), 5 => array ( 'RoomDimensions' => '19X15', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Main', 'RoomType' => 'Family Room', 'RoomWindowTreatments' => '1', ), 6 => array ( 'RoomDimensions' => '15X13', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Basement', 'RoomType' => 'Optional Room 4', 'RoomWindowTreatments' => '1', ), 7 => array ( 'RoomDimensions' => '15X12', 'RoomFloors' => 'Hardwood', 'RoomLevel' => 'Main', 'RoomType' => 'Kitchen', 'RoomWindowTreatments' => '1', ), 8 => array ( 'RoomDimensions' => '17X13', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Main', 'RoomType' => 'Living Room', 'RoomWindowTreatments' => '1', ), 9 => array ( 'RoomDimensions' => '21X13', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Upper', 'RoomType' => 'Master Bedroom', 'RoomWindowTreatments' => '1', ), 10 => array ( 'RoomDimensions' => '18X12', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Upper', 'RoomType' => '5th Bedroom', 'RoomWindowTreatments' => '1', ), 11 => array ( 'RoomDimensions' => '12X11', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Main', 'RoomType' => 'Den/Library', 'RoomWindowTreatments' => '1', ), 12 => array ( 'RoomDimensions' => '15X15', 'RoomFloors' => 'Carpeting', 'RoomLevel' => 'Basement', 'RoomType' => 'Home Theatre', 'RoomWindowTreatments' => '1', ), )); echo $x;
Output for 5.2.0 - 7.2.0
[{"RoomDimensions":"15X12","RoomFloors":"Carpeting","RoomLevel":"Upper","RoomType":"2nd Bedroom","RoomWindowTreatments":"1"},{"RoomDimensions":"13X12","RoomFloors":"Carpeting","RoomLevel":"Upper","RoomType":"3rd Bedroom","RoomWindowTreatments":"1"},{"RoomDimensions":"13X13","RoomFloors":"Carpeting","RoomLevel":"Upper","RoomType":"4th Bedroom","RoomWindowTreatments":"1"},{"RoomDimensions":"12X10","RoomFloors":"Hardwood","RoomLevel":"Main","RoomType":"Breakfast Room","RoomWindowTreatments":"1"},{"RoomDimensions":"15X13","RoomFloors":"Carpeting","RoomLevel":"Main","RoomType":"Dining Room","RoomWindowTreatments":"1"},{"RoomDimensions":"19X15","RoomFloors":"Carpeting","RoomLevel":"Main","RoomType":"Family Room","RoomWindowTreatments":"1"},{"RoomDimensions":"15X13","RoomFloors":"Carpeting","RoomLevel":"Basement","RoomType":"Optional Room 4","RoomWindowTreatments":"1"},{"RoomDimensions":"15X12","RoomFloors":"Hardwood","RoomLevel":"Main","RoomType":"Kitchen","RoomWindowTreatments":"1"},{"RoomDimensions":"17X13","RoomFloors":"Carpeting","RoomLevel":"Main","RoomType":"Living Room","RoomWindowTreatments":"1"},{"RoomDimensions":"21X13","RoomFloors":"Carpeting","RoomLevel":"Upper","RoomType":"Master Bedroom","RoomWindowTreatments":"1"},{"RoomDimensions":"18X12","RoomFloors":"Carpeting","RoomLevel":"Upper","RoomType":"5th Bedroom","RoomWindowTreatments":"1"},{"RoomDimensions":"12X11","RoomFloors":"Carpeting","RoomLevel":"Main","RoomType":"Den\/Library","RoomWindowTreatments":"1"},{"RoomDimensions":"15X15","RoomFloors":"Carpeting","RoomLevel":"Basement","RoomType":"Home Theatre","RoomWindowTreatments":"1"}]
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_encode() in /in/42UO8 on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_encode() in /in/42UO8 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_encode() in /in/42UO8 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_encode() in /in/42UO8 on line 3