Hướng dẫn dùng normalize trong PHP
(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL intl >= 1.0.0) Normalizer::normalize -- normalizer_normalize — Normalizes the input provided and returns the normalized string Object-oriented style public static Normalizer::normalize(string
normalizer_normalize(string The input string to normalize One of the
normalization forms. The normalized string or Example #1 normalizer_normalize() example
urlencode($char_1); Example #2 OO example
urlencode($char_1); The above example will output: See Also
spam at oscar dot xyz ¶ 7 years ago
anrdaemon at freemail dot ru ¶ 4 years ago
akniep at rayo dot info ¶ 13 years ago
$s = Normalizer::normalize( $s, Normalizer::FORM_D );$s = preg_replace( '@\[email protected]' , "", $s ); // removes diacritics$s = preg_replace( '@\x{00df}@u' , "ss", $s ); // maps German ß onto ss tom dot vom dot berg at online dot de ¶ 8 years ago
|