Re: Hex2Bin??

From: Date: Tue, 30 Apr 2002 20:19:52 +0000
Subject: Re: Hex2Bin??
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-95438@lists.php.net to get a copy of this message
I'd recommend writing a wrapper around base_convert, naming it hex2bin and using that instead. base_convert() is way too expensive for this purpose (you know that any hex figure is translated to exactly four bits, so you don't need any actual conversion - just replacement). This is why I suggested the wrapper - you can change the code at any time if you see it's too time-consuming... Bogdan Joshua E Minnie wrote:
Although the first comment was not what I needed, I did find another built-in function that converts between any base, base_convert($number, $frombase, $tobase) worked wonderful for what I needed. Josh "Miguel Cruz" <mnc@stoic.net> wrote in message news:Pine.LNX.4.44.0204301331340.24584-100000@stoic.net...
On Tue, 30 Apr 2002, Joshua E Minnie wrote:
I know that there is a built-in function for bin2hex(), but does any
body
know have any code to do just the opposite, convert hex2bin?
Check the first comment in the manual under bin2hex. miguel


« previous php.general (#95438) next »