Thank you for your answer Richard, unfortunately the port from perl to PHP didn't work out the way I wanted it to - probably mainly because of the lack of perl knowledge here.
And yes you are right, the numbers I use are a lot bigger than 2147483647. If anyone has an idea on how to treat the numbers or hex number for that matter please don't hesitate. Anyway, I'm dropping the project for now. Thanks again. -----Oorspronkelijk bericht----- Van: Richard Lynch [mailto:[EMAIL PROTECTED]] Verzonden: zondag 7 juli 2002 0:12 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] Re: Help needed with hexdec(); >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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php