3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "1$"; $cc = 1337; $bb=42; $k2 = "00000000000000000000000000000000000{$cc}$"; var_dump(strlen($k2) == $bb); var_dump(preg_match('/^\d+$/', $k2)); var_dump(!is_numeric($k2)); var_dump($k2 == $cc); $cc = '11111111111111111111111111'; var_dump(substr($cc, $bb)); var_dump(sha1($cc)); var_dump(sha1(1337)); $a = 1;
Output for 8.0.0 - 8.0.22, 8.1.0 - 8.1.9
bool(true) int(1) bool(true) bool(false) string(0) "" string(40) "11bc9a0814014e1df6aa2a3ee70e46537a3ce6c9" string(40) "77ba9cd915c8e359d9733edcfe9c61e5aca92afb"
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.33, 7.4.0 - 7.4.30
bool(true) int(1) bool(true) bool(true) bool(false) string(40) "11bc9a0814014e1df6aa2a3ee70e46537a3ce6c9" string(40) "77ba9cd915c8e359d9733edcfe9c61e5aca92afb"

preferences:
18.95 ms | 411 KiB | 5 Q