3v4l.org

run code in 300+ PHP versions simultaneously
<?php $res = 680131659347; define('ALPHABET', 'acdegilmnoprstuw'); echo get_hash(ALPHABET, 'leepadg'), PHP_EOL; function get_hash($alphabet, $string) { $h = 7; $len = strlen($string); for($i = 0; $i < $len; $i++) { $h = ($h * 37 + strpos($alphabet, $string[$i])); } return $h; } function unhash($alphabet, $hash) { $result = ''; $len = strlen($letters); while ($res > 7) { for ($i = 0; $i < $len; $i++) { $newres = ($res - $i) / 37; if (is_int($newres)) { $result .= $letters[$i]; $res = $newres; break; } } return strrev($result); } }

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.0100.01016.49
8.3.50.0110.00417.83
8.3.40.0090.00618.67
8.3.30.0070.00719.13
8.3.20.0070.00020.18
8.3.10.0040.00421.91
8.3.00.0000.00820.90
8.2.180.0090.00918.16
8.2.170.0090.00622.96
8.2.160.0100.00721.95
8.2.150.0020.00524.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00419.66
8.2.110.0030.00620.47
8.2.100.0060.00618.22
8.2.90.0080.00019.17
8.2.80.0050.00317.97
8.2.70.0050.00317.75
8.2.60.0030.00718.16
8.2.50.0050.00318.07
8.2.40.0000.00819.95
8.2.30.0000.00818.05
8.2.20.0030.00517.88
8.2.10.0040.00418.18
8.2.00.0040.00417.74
8.1.280.0140.00325.92
8.1.270.0060.00320.78
8.1.260.0070.00026.35
8.1.250.0090.00028.09
8.1.240.0050.00523.79
8.1.230.0030.00618.97
8.1.220.0040.00417.76
8.1.210.0000.00918.77
8.1.200.0000.00917.35
8.1.190.0040.00417.22
8.1.180.0080.00018.10
8.1.170.0040.00418.48
8.1.160.0030.00522.02
8.1.150.0040.00418.91
8.1.140.0040.00419.27
8.1.130.0080.00017.75
8.1.120.0030.00517.50
8.1.110.0030.00617.36
8.1.100.0000.00817.44
8.1.90.0040.00417.53
8.1.80.0040.00417.50
8.1.70.0030.00317.50
8.1.60.0000.00917.48
8.1.50.0040.00417.46
8.1.40.0000.00917.56
8.1.30.0080.00017.54
8.1.20.0000.00817.70
8.1.10.0040.00417.43
8.1.00.0030.00617.43
8.0.300.0050.00218.77
8.0.290.0060.00316.75
8.0.280.0000.00718.34
8.0.270.0030.00317.32
8.0.260.0040.00417.27
8.0.250.0000.00716.90
8.0.240.0060.00317.01
8.0.230.0030.00416.94
8.0.220.0070.00016.94
8.0.210.0070.00016.88
8.0.200.0030.00316.86
8.0.190.0000.00716.84
8.0.180.0020.00516.97
8.0.170.0080.00016.94
8.0.160.0070.00016.77
8.0.150.0070.00016.81
8.0.140.0070.00016.77
8.0.130.0030.00313.31
8.0.120.0000.00816.92
8.0.110.0040.00416.91
8.0.100.0000.00816.86
8.0.90.0070.00016.94
8.0.80.0030.01316.94
8.0.70.0040.00416.93
8.0.60.0000.00716.77
8.0.50.0000.00716.77
8.0.30.0130.00417.13
8.0.20.0160.00717.40
8.0.10.0050.00316.87
8.0.00.0120.00616.74
7.4.330.0000.00615.03
7.4.320.0030.00316.63
7.4.300.0030.00316.54
7.4.290.0030.00316.54
7.4.280.0040.00416.45
7.4.270.0000.00716.62
7.4.260.0070.00016.54
7.4.250.0030.00516.50
7.4.240.0060.00116.58
7.4.230.0050.00216.40
7.4.220.0070.01116.65
7.4.210.0090.00616.62
7.4.200.0000.00816.68
7.4.160.0140.00316.46
7.4.150.0110.02417.40
7.4.140.0090.00917.86
7.4.130.0130.00316.39
7.4.120.0080.01116.49
7.4.110.0110.00716.73
7.4.100.0120.00616.41
7.4.90.0080.00816.54
7.4.80.0060.01219.39
7.4.70.0100.00716.54
7.4.60.0120.00416.43
7.4.50.0080.00016.57
7.4.40.0110.00516.46
7.4.30.0070.01116.44
7.4.00.0060.00915.23
7.3.330.0000.00613.25
7.3.320.0080.00413.36
7.3.310.0030.00316.28
7.3.300.0000.00716.38
7.3.290.0130.00416.35
7.3.280.0080.00916.38
7.3.270.0140.01017.40
7.3.260.0140.00316.43
7.3.250.0150.00816.41
7.3.240.0000.01716.55
7.3.230.0090.00916.39
7.3.210.0080.01116.52
7.3.200.0100.01319.39
7.3.190.0060.00916.63
7.3.180.0090.01316.36
7.3.170.0090.00916.50
7.3.160.0060.00916.39
7.3.120.0030.01015.18
7.3.110.0070.01015.09
7.3.100.0000.01015.02
7.3.90.0080.00814.94
7.3.80.0090.00314.90
7.3.70.0080.00815.02
7.3.60.0090.00614.81
7.3.50.0070.00414.91
7.3.40.0040.00714.82
7.3.30.0100.00314.85
7.3.20.0070.00716.77
7.3.10.0040.01116.66
7.3.00.0040.01116.74
7.2.330.0060.01216.69
7.2.320.0110.00716.90
7.2.310.0160.00616.69
7.2.300.0070.01016.80
7.2.290.0070.01116.65
7.2.240.0070.01014.74
7.2.230.0110.00415.27
7.2.220.0070.01015.31
7.2.210.0100.00715.01
7.2.200.0110.00714.98
7.2.190.0030.00915.26
7.2.180.0030.01315.03
7.2.170.0000.01315.04
7.2.160.0060.00315.27
7.2.150.0060.00316.71
7.2.140.0070.01016.91
7.2.130.0070.01016.96
7.2.120.0070.00716.91
7.2.110.0070.00717.06
7.2.100.0000.01417.04
7.2.90.0090.00316.93
7.2.80.0040.00416.99
7.2.70.0070.01016.97
7.2.60.0090.00616.72
7.2.50.0070.01116.88
7.2.40.0000.01017.02
7.2.30.0000.01716.96
7.2.20.0070.00717.11
7.2.10.0000.00816.83
7.2.00.0050.00818.26
7.1.330.0030.01015.59
7.1.320.0040.00915.71
7.1.310.0030.01115.92
7.1.300.0030.01016.00
7.1.290.0040.01115.84
7.1.280.0060.00615.91
7.1.270.0030.01015.59
7.1.260.0090.00615.91
7.1.250.0030.00915.99
7.1.200.0000.01315.60
7.1.100.0040.00818.36
7.1.70.0000.01217.25
7.1.60.0110.01119.46
7.1.50.0030.02017.01
7.1.00.0070.07022.44
7.0.200.0140.00316.74
7.0.140.0000.07722.07
7.0.60.0070.03720.04
7.0.50.0000.04317.89
7.0.40.0030.07320.27
7.0.30.0170.04320.11
7.0.20.0270.06020.19
7.0.10.0070.04020.27
7.0.00.0130.05320.29
5.6.280.0130.06321.13
5.6.210.0070.07720.70
5.6.200.0130.07018.27
5.6.190.0000.05720.64
5.6.180.3570.04720.63
5.6.170.0270.03720.54
5.6.160.0100.07320.49
5.6.150.0070.04718.15
5.6.140.0070.03718.28
5.6.130.0130.06718.28
5.6.120.0000.04721.15
5.6.110.0070.08320.99
5.6.100.0030.08320.98
5.6.90.0000.04321.13
5.6.80.0030.04020.54
5.5.350.0130.08020.47
5.5.340.0100.06318.02
5.5.330.0070.04320.41
5.5.320.3430.03320.25
5.5.310.0230.08020.34
5.5.300.0000.05718.08
5.5.290.0030.05018.08
5.5.280.0070.07720.86
5.5.270.0000.07320.80
5.5.260.0130.07320.77
5.5.250.0170.08320.69
5.5.240.4230.03720.09
5.4.450.0730.05019.46
5.4.440.0830.05319.61
5.4.430.0900.06719.47
5.4.420.0800.05319.38
5.4.410.0830.04719.48
5.4.400.1030.05019.31
5.4.390.0170.06318.70
5.4.380.0270.05318.50
5.4.370.0130.06018.50
5.4.360.0130.05718.57
5.4.350.0170.05718.74
5.4.340.0170.05318.73
5.4.320.0230.05318.78
5.4.310.0300.05018.55
5.4.300.0230.05318.62
5.4.290.0230.05318.53
5.4.280.0170.06318.70
5.4.270.0070.06318.79
5.4.260.0170.05718.79
5.4.250.0170.07018.56
5.4.240.0270.06018.58
5.4.230.0200.05318.77
5.4.220.0200.06018.77
5.4.210.0200.05318.76
5.4.200.0130.06316.62
5.4.190.0070.06318.78
5.4.180.0330.04018.52
5.4.170.0330.04318.52
5.4.160.0230.05318.74
5.4.150.0100.06318.75
5.4.140.0200.05316.50
5.4.130.0170.05316.31
5.4.120.0230.04716.22
5.4.110.0170.05316.27
5.4.100.0230.05016.19
5.4.90.0130.06716.35
5.4.80.0270.04316.29
5.4.70.0230.05016.20
5.4.60.0230.04716.31
5.4.50.0200.05016.30
5.4.40.0170.06016.26
5.4.30.0270.04316.39
5.4.20.0230.04316.29
5.4.10.0100.05716.31
5.4.00.0200.04715.67
5.3.290.0230.05014.83
5.3.280.0100.06014.70
5.3.270.0170.05714.82
5.3.260.0300.04314.59
5.3.250.0100.06314.71
5.3.240.0170.05714.67
5.3.230.0130.06314.73
5.3.220.0230.05014.76
5.3.210.0330.04714.67
5.3.200.0200.05014.67
5.3.190.0130.05714.63
5.3.180.0270.04714.68
5.3.170.0170.05714.77
5.3.160.0200.05014.63
5.3.150.0170.06314.61
5.3.140.0370.04014.56
5.3.130.0230.05314.55
5.3.120.0270.05014.61
5.3.110.0100.06314.59
5.3.100.0230.05014.15
5.3.90.0200.05014.07
5.3.80.0170.05014.15
5.3.70.0230.04714.07
5.3.60.0230.04714.08
5.3.50.0170.05314.02
5.3.40.0230.05714.01
5.3.30.0170.06014.01
5.3.20.0100.05713.81
5.3.10.0170.05313.74
5.3.00.0270.04013.68
5.2.170.0130.04311.38
5.2.160.0100.04711.18
5.2.150.0170.04711.25
5.2.140.0170.03711.13
5.2.130.0100.04311.11
5.2.120.0230.03711.18
5.2.110.0100.04711.23
5.2.100.0130.04311.33
5.2.90.0200.04011.23
5.2.80.0070.05311.14
5.2.70.0100.05711.17
5.2.60.0130.04311.04
5.2.50.0200.03711.13
5.2.40.0170.03711.06
5.2.30.0130.04011.00
5.2.20.0270.03311.09
5.2.10.0200.03711.08
5.2.00.0170.04310.80
5.1.60.0100.03710.03
5.1.50.0170.0309.99
5.1.40.0130.03710.00
5.1.30.0100.04010.55
5.1.20.0070.04310.46
5.1.10.0130.03310.11
5.1.00.0170.04010.17
5.0.50.0030.0379.51
5.0.40.0100.0239.51
5.0.30.0200.0379.51
5.0.20.0100.0279.51
5.0.10.0100.0279.51
5.0.00.0100.0439.51
4.4.90.0000.0279.51
4.4.80.0100.0209.51
4.4.70.0070.0239.51
4.4.60.0070.0239.51
4.4.50.0100.0209.51
4.4.40.0030.0379.51
4.4.30.0170.0109.51
4.4.20.0070.0209.51
4.4.10.0070.0239.51
4.4.00.0030.0409.51
4.3.110.0030.0279.51
4.3.100.0070.0209.51
4.3.90.0070.0209.51
4.3.80.0100.0339.51
4.3.70.0100.0279.51
4.3.60.0100.0239.51
4.3.50.0100.0209.51
4.3.40.0130.0279.51
4.3.30.0130.0209.51
4.3.20.0000.0279.51
4.3.10.0070.0309.51
4.3.00.0300.02714.57

preferences:
54.03 ms | 400 KiB | 5 Q