PHP Function Bin2Hex
php function bin2hex converts the binary data into hexadecimal string representation. The conversion is done byte wise with the high nibble pattern converted first. The function can also be used in conjunction with pack() and unpack() to convert hexadecimal strings back to their binary form.
Several other functions exist for performing basic string manipulations, such as addslashes() which encodes a text string to ensure that it's safe to send over a text channel. The count_chars() function can return a list of all the characters in a string, or an associative array with the frequency of each character.
There are other string functions available to handle more advanced processing of a string, such as rtrim() which removes all white spaces and other predefined characters from a string; explode(), which splits a string into an array; and strftime(), which handles formatting dates. There are even a few string manipulation functions which you may not find in any other language, such as strtok (which does the same as preg_replace with /e and then evals it) and the very hacky cpp_split().
As a final note, it is important to remember that in PHP all global variables require an explicit declaration before they can be read or written. There is no pass-by-object identity, like Perl, and there is no function equivalent of printf/vprintf (though the combination of sprintf/vsprintf is a reasonable alternative). This makes it very important to use strict code, in order to avoid bugs due to global variables.