php intval function uses the encounter pits

the intval () function is used to obtain an integer value of variable

We should be careful to use a range of intval;

Echo intval ( "420000000000000000000"); // 2147483647

PHP 32-bit version:

Integers from -2,147,483,648 to 2,147,483,647 (~ 2 billion)
64-bit version of PHP:

Integer from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (~ ± one billionth 9)

Guess you like

Origin blog.51cto.com/xuqin/2454342