<?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 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- string(5) "g?eld"
string(7) "g〓eld"
string(7) "g〓eld"
- Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30
- string(10) "gBAD+A4eld"
string(7) "g〓eld"
string(7) "g〓eld"
- Output for 5.2.5 - 5.2.17, 5.3.0 - 5.3.29
- string(4) "geld"
string(4) "geld"
string(4) "geld"
- Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 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"
preferences:
269.39 ms | 402 KiB | 356 Q