3v4l.org

run code in 300+ PHP versions simultaneously
<?php function startsWith($haystack, $needle) { return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE; } function find_dec_prefix($str) { $i = 0; for(;;$i++) { $newstr = $str . $i; $hash = sha1($newstr); if($hash[0] == '0' && $hash[1] == 'e') { // echo "Found it: [" . $newstr . "] " . $hash . "\n"; // echo "subs: " . substr($hash, 2) . "\n"; if(!preg_match("/[a-f]/", substr($hash, 2))) { echo "doesn't contain a-f: $hash\n"; return $newstr; } } } } $pass1 = find_dec_prefix("suPERSecretPasSw0rD"); $pass2 = find_dec_prefix("omgDONTcollidePLEASE"); var_dump(sha1($pass1) == sha1($pass2)); echo(sha1('aaroZmOk') . " - " . sha1('aaK1STfY') . "\n");

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0101.99318.68
8.3.50.0071.99522.04
8.3.40.0231.98118.72
8.3.30.0101.99419.14
8.3.20.0071.99520.34
8.3.10.0071.99421.77
8.3.00.0071.99719.26
8.2.180.0071.99816.48
8.2.170.0101.99422.96
8.2.160.0171.98522.20
8.2.150.0032.00024.18
8.2.140.0071.99724.66
8.2.130.0071.99626.16
8.2.120.0031.99819.61
8.2.110.0131.99121.08
8.2.100.0131.99018.00
8.2.90.0071.99519.35
8.2.80.0032.00018.00
8.2.70.0031.99717.88
8.2.60.0002.00017.93
8.2.50.0071.99818.07
8.2.40.0002.00420.01
8.2.30.0032.00118.30
8.2.20.0002.00218.05
8.2.10.0002.00618.30
8.2.00.0071.99518.03
8.1.280.0101.99325.92
8.1.270.0071.99619.08
8.1.260.0002.00226.35
8.1.250.0071.99628.09
8.1.240.0131.99119.38
8.1.230.0071.99517.79
8.1.220.0032.00017.78
8.1.210.0031.99918.77
8.1.200.0002.00417.35
8.1.190.0071.99417.38
8.1.180.0032.00018.10
8.1.170.0032.00018.70
8.1.160.0101.97722.18
8.1.150.0031.99919.03
8.1.140.0002.01017.60
8.1.130.0031.99817.86
8.1.120.0031.99817.68
8.1.110.0071.99617.64
8.1.100.0002.00317.70
8.1.90.0002.00217.66
8.1.80.0002.00217.68
8.1.70.0002.00317.69
8.1.60.0031.99917.80
8.1.50.0032.00017.73
8.1.40.0031.99717.69
8.1.30.0032.00117.83
8.1.20.0071.99617.75
8.1.10.0071.99417.81
8.1.00.0061.99617.60
8.0.300.0031.99818.77
8.0.290.0031.99816.75
8.0.280.0071.99618.41
8.0.270.0031.99817.12
8.0.260.0002.00217.13
8.0.250.0071.99517.08
8.0.240.0002.00317.01
8.0.230.0002.00417.07
8.0.220.0002.00416.95
8.0.210.0031.99917.10
8.0.200.0071.99617.16
8.0.190.0031.99917.14
8.0.180.0031.99916.96
8.0.170.0002.00217.03
8.0.160.0031.99717.17
8.0.150.0031.99816.96
8.0.140.0031.99817.08
8.0.130.0002.00213.55
8.0.120.0032.00016.88
8.0.110.0031.99816.91
8.0.100.0002.00217.03
8.0.90.0032.00017.01
8.0.80.0161.99016.98
8.0.70.0002.00317.05
8.0.60.0071.99617.04
8.0.50.0031.99816.86
8.0.30.0121.98317.21
8.0.20.0391.96317.40
8.0.10.0002.00317.14
8.0.00.0161.98316.92
7.4.330.0031.99415.03
7.4.320.0002.00216.55
7.4.300.0002.00116.73
7.4.290.0002.00216.74
7.4.280.0031.99816.61
7.4.270.0071.99716.53
7.4.260.0071.99716.56
7.4.250.0071.99716.46
7.4.240.0181.98416.67
7.4.230.0002.00216.65
7.4.220.0031.99416.47
7.4.210.0131.98716.73
7.4.200.0101.99316.63
7.4.160.0101.97716.68
7.4.150.0381.94617.40
7.4.140.0141.98317.86
7.4.130.0081.99416.71
7.4.120.0131.98316.58
7.4.110.0102.43416.60
7.4.100.0222.43116.69
7.4.90.0072.43216.57
7.4.80.0212.39319.39
7.4.70.0132.43716.61
7.4.60.0162.44916.84
7.4.50.0072.49216.53
7.4.40.0132.45616.52
7.4.30.0232.43116.56
7.4.00.0032.49315.14
7.3.330.0002.00313.36
7.3.320.0032.00013.44
7.3.310.0031.99916.36
7.3.300.0071.99616.52
7.3.290.0101.99116.38
7.3.280.0221.97016.41
7.3.270.0551.99117.40
7.3.260.0351.96516.43
7.3.250.0261.98316.48
7.3.240.0131.98716.52
7.3.230.0292.27116.50
7.3.210.0072.45616.64
7.3.200.0192.41719.39
7.3.190.0132.43516.51
7.3.180.0072.46916.57
7.3.170.0232.43716.36
7.3.160.0162.43816.51
7.2.330.0102.44816.71
7.2.320.0002.47316.95
7.2.310.0132.46016.80
7.2.300.0092.43016.68
7.2.290.0072.44716.82
7.2.80.0032.49416.88
7.2.60.0002.49717.00
7.2.00.0032.49819.64
7.1.200.0102.48015.97
7.1.100.0072.49518.52
7.1.70.0002.50117.45
7.1.60.0132.48819.50
7.1.50.0132.48817.21
7.1.00.0002.50022.24
7.0.200.0772.18815.00
7.0.140.0002.50021.98
7.0.60.0102.49019.95
7.0.50.0032.49717.87
7.0.40.0132.48719.91
7.0.30.0272.47319.82
7.0.20.0202.48020.00
7.0.10.0172.48319.89
7.0.00.0032.49719.99
5.6.280.0172.48321.13
5.6.210.0072.49320.75
5.6.200.0102.49018.14
5.6.190.0072.47720.41
5.6.180.0302.47020.37
5.6.170.0102.49020.40
5.6.160.0102.49020.40
5.6.150.0232.45718.16
5.6.140.0072.49318.18
5.6.130.0172.48318.14
5.6.120.0132.48721.05
5.6.110.0072.49321.13
5.6.100.0172.48320.98
5.6.90.0102.49021.09
5.6.80.0102.49020.42
5.5.350.0232.47720.36
5.5.340.0032.49717.93
5.5.330.0072.49320.32
5.5.320.0102.49020.03
5.5.310.0232.47720.23
5.5.300.0072.49317.94
5.5.290.0032.49717.96
5.5.280.0172.48320.90
5.5.270.0072.49320.73
5.5.260.0072.49320.84
5.5.250.0072.49320.80
5.5.240.0032.49720.08
5.4.450.0532.44319.14
5.4.440.0002.49719.34
5.4.430.0202.47719.36
5.4.420.0272.47019.33
5.4.410.0232.47319.21
5.4.400.1171.43718.81
5.4.390.1231.54018.55
5.4.380.1271.37318.59
5.4.370.1631.73018.75
5.4.360.1231.58018.79
5.4.350.1101.99018.56
5.4.340.1432.30318.55
5.4.320.2102.21718.74
5.4.310.1702.22318.72
5.4.300.1632.24018.69
5.4.290.1432.24718.77
5.4.280.1502.19718.73
5.4.270.1702.14718.55
5.4.260.1602.19718.68
5.4.250.2002.17718.46
5.4.240.1672.21318.46
5.4.230.1632.22318.74
5.4.220.1832.25318.68
5.4.210.1802.25718.45
5.4.200.1872.24016.62
5.4.190.1932.11718.53
5.4.180.1572.08318.75
5.4.170.1972.22318.56
5.4.160.1872.09718.52
5.4.150.1702.19018.77
5.4.140.1602.19016.32
5.4.130.0202.33316.32
5.4.120.0171.54316.26
5.4.110.3771.31716.21
5.4.100.0101.45316.28
5.4.90.0801.59316.29
5.4.80.1101.40016.20
5.4.70.1031.01016.39
5.4.60.1031.09316.22
5.4.50.6330.41716.25
5.4.40.0870.94316.18
5.4.30.0530.87716.24
5.4.20.0232.47016.52
5.4.10.0232.47716.23

preferences:
45.51 ms | 401 KiB | 5 Q