3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numero_grande = 2147483647; var_dump($numero_grande); // saida: int(2147483647) $numero_grande = 2147483648; var_dump($numero_grande); // saida: float(2147483648) // é válido também para inteiros hexadecimais entre 2^31 e 2^32-1: var_dump( 0xffffffff ); // output: float(4294967295) // porém não é válido para hexadecimais com valores acima de 2^32-1: var_dump( 0x100000000 ); // output: int(2147483647) $milhao = 1000000; $numero_grande = 50000 * $milhao; var_dump($numero_grande); // saida: float(50000000000)
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.1 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
int(2147483647) int(2147483648) int(4294967295) int(4294967296) int(50000000000)
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/PSbZs on line 21
Process exited with code 255.

preferences:
298.04 ms | 401 KiB | 459 Q