Subject Re: [firebird-php] Generators, BIGINTs and handling them in PHP.
Author Lester Caine
Max dAyala wrote:
> Hello everyone, I've just joined the list. I'm currently working on a
> project with PHP and Firebird 2.0, having just moved up from Firebird 1.5.
>
> One thing I've found out is that Firebird 2 generators produce
> Bigints, whereas PHP will only handle 32 bit integers on the Linux
> platform I'm using. When I get Bigint values back from the database
> PHP presents them to me as strings. Hence, I've run into a few
> problems where I've been working with integer values but various PHP
> functions of mine now fail because they are designed to handle
> integers rather than strings.
>
> While I can fix up individual errors I find, I was wondering if anyone
> has any experience of generalising number handling in PHP that would
> cope with both strings and number values.
>
> In the PHP manual there are GMP Functions:
> http://www.php.net/manual/en/ref.gmp.php
>
> Also other libs such as PEAR Bigint:
> http://pear.php.net/reference/Crypt_RSA-1.0.0/Crypt_RSA/_Crypt_RSA-1.0.0_RSA_Math_BigInt_php.html
>
> Has anyone used these, or anything similar, and are there any
> significant performance issues when using these functions.
>
> Thanks for any feedback you can offer.

Since there has not been a reply ....
I've been using ADOdb exclusively which works with the strings and I'm
starting to use BIGINT for things other than just generators, but I've not had
need to processes the results as numbers yet :(

--
Lester Caine - G8HFL
-----------------------------
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird - http://www.firebirdsql.org/index.php