3v4l.org

run code in 500+ PHP versions simultaneously
<?php // PHP Get Integer Size (wouldn't expect 32-bit OS to deal with 64-bit Int's) var_dump(PHP_INT_SIZE); // setup $dt = DateTime::createFromFormat("U", PHP_INT_MAX); // should return 64-bit max var_dump(sprintf("%064b", $dt->format('U'))); // should return 64-bit max var_dump(sprintf("%064b", $dt->getTimestamp()));
Output for 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.21, 7.4.0 - 7.4.10, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
int(8) string(64) "0111111111111111111111111111111111111111111111111111111111111111" string(64) "0111111111111111111111111111111111111111111111111111111111111111"
Output for 7.3.23 - 7.3.33, 7.4.11 - 7.4.33, 8.0.0 - 8.0.30
int(8) string(64) "0000110011001100110011001100110011001110100010110100000111001011" string(64) "0000110011001100110011001100110011001110100010110100000111001011"

preferences:
88.26 ms | 1989 KiB | 4 Q