title: Searching for a good Unicode-compatible alternative to the PHP ord() function
body: <p>After quite a bit of searching and testing, the simplest method I've found for a Unicode-compatible alternative to the PHP <code>ord()</code> function is this:</p>
  
  <pre><code>$utf8Character = 'Ą';
  list(, $ord) = unpack('N', mb_convert_encoding($utf8Character, 'UCS-4BE', 'UTF-8'));
  echo $ord; # 260
  </code></pre>
  
  <p>I found this <a href="https://stackoverflow.com/questions/10333098/utf-8-safe-equivelant-of-ord-or-charcodeat-in-php">here</a>. However, <a href="http://www.php.net/manual/en/function.ord.php#106052" rel="nofollow noreferrer">it has been mentioned</a> that this method is rather slow. Does anyone know of a more efficient method which is nearly as simple? And what does UCS-4BE mean?</p>