Reputation: 1
I'm using a 32bit system and I have to handle longint. Is there any way to handle longint (64bit integer) in PHP on 32bit system? (I cannot use (int) convertion)
Upvotes: 0
Views: 1043
Reputation: 48284
Here is one way:
Thank you for your answer, but if I want to bind a longint to a query using prepare statement in most of the db connection provider, is there any way to do it?
I don't know which particular interface you are using, but you can probably convert the GMP (or whatever you use) integer into a numeric string. Then bind that numeric string and it should work.
Upvotes: 0
Reputation: 11556
Check out the GMP library or BCmath which are usually installed with PHP.
Check out the Working with large numbers in PHP thread for more discussion.
Upvotes: 2