: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
public static function hex2bin($string) { //Polyfill for PHP < 5.4
if (!is_string($string)) { return false; }
if (strlen($string) % 2 == 1) { return false; }
return pack('H*', $string);