Fw: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()? From: Jon Tai (jon <email protected>)
Date: 11/15/00

function hex2bin($hex_str) {
  for ($i = 0; $i < strlen($hex_str); $i += 2) {
    $bin_str .= chr(hexdec(substr($hex_str, $i, 2)));
  }
  return $bin_str;
}

I've been using this homemade one in the past, but I agree that a hex2bin
function should be built in.

----- Original Message -----
From: <marten <email protected>>
To: <php-dev <email protected>>
Sent: Wednesday, November 15, 2000 5:16 AM
Subject: [PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?

From: marten <email protected>
Operating system:
PHP version: 4.0 Latest CVS (15/11/2000)
PHP Bug Type: Feature/Change Request
Bug description: hex2bin()?

We have bin2hex(), how about adding hex2bin()?

--
Edit Bug report at: http://bugs.php.net/?id=7829&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>