<?php
var_dump( json_decode( "\"a\xb0b\"", null, 512, JSON_INVALID_UTF8_IGNORE ) );
var_dump( json_decode( "\"a\xb0b\"", null, 512, JSON_INVALID_UTF8_SUBSTITUTE ) );
var_dump( json_decode( "\"a\xb0b\"", null, 512, JSON_INVALID_UTF8_IGNORE | JSON_INVALID_UTF8_SUBSTITUTE ) );
string(2) "ab"
string(5) "a�b"
string(5) "a�b"
string(2) "ab"
string(5) "a�b"
<some kind of ValueError>
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
Operating System
No response