On Wed, Jun 26, 2013 at 9:21 PM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:
> Hi all, > > hex2bin raises E_WARNING for odd length hex strings from PHP 5.4.1. > http://jp2.php.net/manual/en/function.hex2bin.php > However, just returning FALSE is easier for programmers. > Why is it easier? If you pass an odd length string to hex2bin you have malformed input, which is usually a bug on the programmers side. Not having a warning would make the issue harder to debug. Nikita