3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php mb_internal_encoding('UTF-8'); $value = 'g' . chr(0xa4) .'eld'; mb_substitute_character('long'); var_dump(mb_convert_encoding($value, 'UTF-8')); mb_substitute_character(0x3013); var_dump(mb_convert_encoding($value, 'UTF-8')); mb_substitute_character('entity'); var_dump(mb_convert_encoding($value, 'UTF-8'));
Output for 5.4.0 - 7.2.0
string(10) "gBAD+A4eld" string(7) "g〓eld" string(7) "g〓eld"
Output for 5.2.5 - 5.3.29
string(4) "geld" string(4) "geld" string(4) "geld"
Output for 4.3.2 - 5.2.4
string(4) "geld" string(4) "geld" Warning: mb_substitute_character(): Unknown character. in /in/DmHja on line 12 string(4) "geld"
Output for 4.3.0 - 4.3.1
string(4) "geld" string(4) "geld" Warning: mb_substitute_character() [http://www.php.net/function.mb-substitute-character]: Unknown character. in /in/DmHja on line 12 string(4) "geld"