3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array( "2_1"=>"1", "2_2"=>"2", "2_3"=>"3" ); $arrr = array( "1_1"=>"_1", "1_2"=>$arr, "1_3"=>"Hello there!" ); echo json_encode( $arrr ) ?>
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
{"1_1":"_1","1_2":{"2_1":"1","2_2":"2","2_3":"3"},"1_3":"Hello there!"}
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_encode() in /in/oc1ic on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_encode() in /in/oc1ic on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_encode() in /in/oc1ic on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_encode() in /in/oc1ic on line 5