String conversion to integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm testing php 7.1 in my project, and I got a strange problem.

$string = '584e82ed00819';
echo (int)$string;

The above code will output 9223372036854775807 (It's PHP_INT_MAX) in php
7.1.
In php 5.5, the result is: 584.

According to the document:
http://php.net/manual/en/language.types.string.php#language.types.string.conversion

I guess php 7.1 process the string as 584e82, but 5.5 did not.

Any differences for string conversion between 7.1 and 5.5 ?

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux