convert 16-byte hex "string" to dec in php

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a string, 16 bytes long, representing a hex number.
I need to convert it to a number and put it into pgsql database; it
complicates the matters further cause pgsql doesn't support unsigned;
thus I have to subtract "magic" number (half the bigint range) from
the conversion result to put it into pgsql.

 Is there any way to achieve this?

Re: convert 16-byte hex "string" to dec in php

You could try this function to convert a very large value from hex to

It uses the bcmath arbitrary precision functions.

Quoted text here. Click to load it

Site Timeline