I am also wondering what you guys do when you have a situation where a method returns binary data. Do you define the return type to be binary or string or what? For example:
Code: Select all
/**
* @return binary
*/
function something()
{
return (binary) $something;
}The difference between binary and string is simple: a string is encoded in Unicode in PHP 6+.
Oh and if anyone is running PHP 6, can you confirm that
Code: Select all
echo strlen((string) ((binary) "è"));