3v4l.org

run code in 300+ PHP versions simultaneously
<?php $float = PHP_INT_MAX * 1000; // float larger than max. int echo $float . "\n"; echo PHP_INT_MAX . "\n"; echo (int) $float . "\n";
Output for 8.5.0 - 8.5.1
9.2233720368548E+21 9223372036854775807 Warning: The float 9.223372036854776E+21 is not representable as an int, cast occurred in /in/JauAu on line 6 0
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.15
9.2233720368548E+21 9223372036854775807 0

preferences:
90.34 ms | 407 KiB | 5 Q