Last active
December 12, 2015 12:19
-
-
Save will-in-wi/4771268 to your computer and use it in GitHub Desktop.
Useful for debugging weird character encoding issues.
This file contains 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 | |
function displayChars($str) { | |
$arr = array(); | |
$chars = str_split($str); | |
foreach ($chars as $key => $value) { | |
$arr[] = array($value, ord($value)); | |
} | |
var_dump($arr); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment