3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //Source: https://bugs.php.net/bug.php?id=63898 $key = "Foo " . chr(163); $array = array($key => ""); print_r($array); ini_set('display_errors', 0); $json = json_encode($array); echo $json."\n"; print_r(json_decode($json));
Output for 5.3.14, 5.5.0 - 7.1.0
Array ( [Foo �] => )
Output for 5.2.7 - 5.3.13, 5.3.15 - 5.4.45
Array ( [Foo �] => ) {null:""}
Output for 5.2.0 - 5.2.6
Array ( [Foo �] => ) {"Foo ":""} stdClass Object ( [Foo ] => )
Output for 4.3.2 - 5.1.6
Array ( [Foo �] => )
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Array ( [Foo �] => )