Re: Help needed with hexdec();
| From: | Richard Lynch | Date: | Sat, 06 Jul 2002 22:11:33 +0000 |
| Subject: | Re: Help needed with hexdec(); | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-105893@lists.php.net to get a copy of this message | ||
>I have to convert a perl script to PHP trying to do so I get negative
>values from hexdec(), If I use (int)hexdec() the numbers aren't negative
>anymore, but they do not add up to what they should.
From the manual: http://php.net/hexdec
"The largest number that can be converted is 7fffffff or 2147483647 in
decimal."
I'm betting your numbers are bigger than that.
I wrote a less-limited hex2dec function years ago, and threw it up on Sklar,
or, uhhh, the *other* PHP code repository. There were really only two, back
then... :-)
--
Like Music? http://l-i-e.com/artists.htm