- var_dump: documentation ( source)
- utf8_decode: documentation ( source)
- json_encode: documentation ( source)
<?php
//var_dump(json_encode(array("foo" => utf8_encode('è'), "bar" => "bar")), json_last_error() === JSON_ERROR_UTF8);
//var_dump(json_encode(array("foo" => utf8_encode('è'), "bar" => "bar"), JSON_PARTIAL_OUTPUT_ON_ERROR));
var_dump(json_encode(array("foo" => utf8_decode('è'), "bar" => "bar")));