3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = str_repeat("9", strlen(PHP_INT_MAX) + 1); var_dump($foo); settype($foo, "integer"); var_dump($foo);
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.21, 7.4.0 - 7.4.10, 8.0.0alpha1 - beta3
string(20) "99999999999999999999" int(9223372036854775807)