Pergunta

I have been browsing through other "wrong int conversion" problems but I haven't found any posts related to mine.

I am converting a 10 char string (e.g '9052000000', '9056699999' ) to to type int, but I keep on getting the value 2147483647

my code looks something like this: $min = '9052000000'; $min = (int) $min;

Hope someone can help. Thanks!

Nenhuma solução correta

Outras dicas

int length is depend on your system 32bit or 64bit.

Please read the manual for this:

[PHP Manual] http://www.php.net/manual/en/language.types.integer.php

You simply hit the limit of integer. Use GMP for abitrary length integers.

Please read the manual for this:

[PHP Manual] http://id1.php.net/intval

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top