Created
November 14, 2016 17:25
-
-
Save felipsmartins/6ab63b2d1717b8b3684aac175c4ca92c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $froms = ['São Luís', 'órgão']; | |
| foreach ($froms as $from) { | |
| $s = Normalizer::normalize($from, Normalizer::NFD); | |
| # http://php.net/manual/en/regexp.reference.unicode.php | |
| print preg_replace('/\p{M}/u' , '', $s); | |
| print PHP_EOL; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment