3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo json_encode(array( // Men's Casual 3 => array( 's' => 2, 'm' => 10, 'l' => 10, 'xl' => 10, 'xxl' => 2, 'xxxl' => 2, ), // Men's Technical 4 => array( 's' => 3, 'm' => 14, 'l' => 18, 'xl' => 11, 'xxl' => 3, 'xxxl' => 2, ), // Women's Technical 5 => array( 'xs' => 2, 's' => 10, 'm' => 15, 'l' => 9, 'xl' => 3, 'xxl' => 2, ), // Women's Casual 8 => array( 's' => 2, 'm' => 5, 'l' => 5, 'xl' => 2, ), ));
based on 7FgBn
Output for 5.2.0 - 7.2.0
{"3":{"s":2,"m":10,"l":10,"xl":10,"xxl":2,"xxxl":2},"4":{"s":3,"m":14,"l":18,"xl":11,"xxl":3,"xxxl":2},"5":{"xs":2,"s":10,"m":15,"l":9,"xl":3,"xxl":2},"8":{"s":2,"m":5,"l":5,"xl":2}}
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_encode() in /in/cNSgV 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/cNSgV 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/cNSgV 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/cNSgV on line 3