Skip to content

Instantly share code, notes, and snippets.

@will-in-wi
Last active December 12, 2015 12:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save will-in-wi/4771268 to your computer and use it in GitHub Desktop.
Useful for debugging weird character encoding issues.
<?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