Created
November 5, 2012 17:20
-
-
Save lukashavrlant/4018437 to your computer and use it in GitHub Desktop.
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
function strID2intID($stringID) { | |
return (ord($stringID[0]) << 8) + ord($stringID[1]); | |
} | |
function intID2strID($intID) { | |
return chr($intID >> 8) . chr($intID % 256); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment