Remove unnecessary polyfill for hex2bin()

This commit is contained in:
Kijin Sung 2017-04-08 21:57:34 +09:00
parent 87131a1b93
commit f73580945d

View file

@ -497,21 +497,6 @@ function include_and_ignore_output($filename)
return $result;
}
/**
* Polyfill for hex2bin() which does not exist in PHP 5.3.
*
* @param string $hex The hexadecimal string to convert to binary
* @return string
*/
if (!function_exists('hex2bin'))
{
function hex2bin($hex)
{
if (strlen($hex) % 2) $hex = '0' . $hex;
return pack('H*', $hex);
}
}
/**
* Converts any value to either true or false.
* Based on util.php <https://github.com/brandonwamboldt/utilphp>