php: What’s the equivalent int() function for bigint type? (int() cuts big numbers to 2147483647)?
Example:
$bigint1="12312342306A_C243";
$bigint1=(int)$bigint1;//2147483647
but I want it to be 12312342306.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There isn’t a built-in type to do this kind of cast as you can see here (from the official doc).
Anyway, you can use the GMP library to manage this long int.