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 5.4.0 - 5.4.32
Parse error: syntax error, unexpected 'numero_grande' (T_STRING), expecting variable (T_VARIABLE) or '$' in /in/KGN5f on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /in/KGN5f on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /in/KGN5f on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/KGN5f on line 2
Process exited with code 255.

preferences:
226.5 ms | 1395 KiB | 123 Q