3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $brokenJson = '[{"test":"aあb"}]'; $res = json_decode($brokenJson, true); if (json_last_error() != JSON_ERROR_NONE) { throw new Exception(json_last_error_msg(), json_last_error()); } var_dump($res);
based on sGBIR
Output for 5.3.19 - 7.2.0
array(1) { [0]=> array(1) { ["test"]=> string(5) "aあb" } }