用get_html_translation_table 调出两个函数的字符变换table
<?php
$table_e = get_html_translation_table(HTML_ENTITIES);
$table_s = get_html_translation_table(HTML_SPECIALCHARS);
echo "<br>----- htmlentities() の変換テーブル -----<br>";
print_r($table_e);
echo "<br>----- htmlspecialchars() の変換テーブル -----<br>";
print_r($table_s);
?>
结果如下:
----- htmlspecialchars() の変換テーブル -----
Array
(
["] => "
[<] => <
[>] => >
[&] => &
)
----- htmlentities() の変換テーブル -----
Array
(
[] =>
[。] => ¡
[「] => ¢
[」] => £
[、] => ¤
[・] => ¥
[ヲ] => ¦
[ァ] => §
[ィ] => ¨
[ゥ] => ©
[ェ] => ª
[ォ] => «
[ャ] => ¬
[ュ] =>
[ョ] => ®
[ッ] => ¯
[ー] => °
[ア] => ±
[イ] => ²
[ウ] => ³
[エ] => ´
[オ] => µ
[カ] => ¶
[キ] => ·
[ク] => ¸
[ケ] => ¹
[コ] => º
[サ] => »
[シ] => ¼
[ス] => ½
[セ] => ¾
[ソ] => ¿
[タ] => À
[チ] => Á
[ツ] => Â
[テ] => Ã
[ト] => Ä
[ナ] => Å
[ニ] => Æ
[ヌ] => Ç
[ネ] => È
[ノ] => É
[ハ] => Ê
[ヒ] => Ë
[フ] => Ì
[ヘ] => Í
[ホ] => Î
[マ] => Ï
[ミ] => Ð
[ム] => Ñ
[メ] => Ò
[モ] => Ó
[ヤ] => Ô
[ユ] => Õ
[ヨ] => Ö
[ラ] => ×
[リ] => Ø
[ル] => Ù
[レ] => Ú
[ロ] => Û
[ワ] => Ü
[ン] => Ý
[゙] => Þ
[゚] => ß
[濔 => à
[畩 => á
[秕 => â
[緇 => ã
[臂 => ä
[蘊 => å
[訃 => æ
[躱 => ç
[鐓 => è
[饐 => é
[鷯 => ê
[・ => ë
[・ => ì
[偰 => í
[硎 => î
[・ => ï
[ => ð
[ => ñ
[ => ò
[ => ó
[ => ô
[ => õ
[ => ö
[ => ÷
[ => ø
[ => ù
[褜 => ú
[猤 => û
[・ => ü
[] => ý
[] => þ
[] => ÿ
["] => "
[<] => <
[>] => >
[&] => &
)
Ref:
https://worthliv.com/wlh_htmlentities_htmlspecialchars.html
网友评论