3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function generateSignature($signatureHash) { $signatureHash = $signatureHash; //generating signature $minVal = (int) -2147483648; $maxVal = (int) 2147483647; $hash = (int) 0; for ($i = 0; $i < strlen($signatureHash); $i++) { $hash = ((int) $hash * 31) + ((int) ord(substr($signatureHash, $i, 1))); if ($hash > $maxVal) { $hash = (int) $hash + (int) $minVal - (int) $maxVal - 1; } else if ($hash < $minVal) { $hash = (int) $hash + (int) $maxVal - (int) $minVal + 1; } } return (int) $hash; } $hash1 = '05MAIN0044JT00001742IDR30534D34314E303034414B3359503459'; $hash2 = '18044515'; echo $signature = generateSignature($hash1) + generateSignature($hash2);

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0070.00716.15
7.3.00.0030.00916.70
7.2.130.0110.01116.64
7.2.120.0120.00616.62
7.2.110.0100.00516.74
7.2.100.0190.00416.53
7.2.90.0150.01016.63
7.2.80.0140.00816.62
7.2.70.0150.00316.81
7.2.60.0160.01016.68
7.2.50.0100.01016.87
7.2.40.0110.00916.94
7.2.30.0120.00516.91
7.2.20.0170.00716.85
7.2.10.0200.00716.77
7.2.00.0100.00817.75
7.1.250.0110.00715.58
7.1.230.0120.00515.71
7.1.220.0190.01115.57
7.1.210.0200.00815.97
7.1.200.0140.00915.59
7.1.190.0190.00415.53
7.1.180.0220.00615.91
7.1.170.0290.00016.03
7.1.160.0180.00415.84
7.1.150.0090.00915.76
7.1.140.0130.00915.81
7.1.130.0170.00015.96
7.1.120.0190.00015.86
7.1.110.0200.00315.67
7.1.100.0490.00815.99
7.1.90.0080.01216.05
7.1.80.0230.00815.75
7.1.70.0120.00516.65
7.1.60.0140.01217.59
7.1.50.0160.00616.57
7.1.40.0200.00415.96
7.1.30.0180.00616.09
7.1.20.0290.00915.96
7.1.10.0190.00615.97
7.1.00.0080.04419.12
7.0.310.0090.01315.29
7.0.300.0200.00315.22
7.0.290.0290.00515.52
7.0.280.0130.00615.48
7.0.270.0100.00315.14
7.0.260.0290.00615.47
7.0.250.0170.01115.53
7.0.240.0180.00415.66
7.0.230.0100.00515.66
7.0.220.0250.00315.18
7.0.210.0140.00715.50
7.0.200.0090.00416.09
7.0.190.0130.00915.51
7.0.180.0250.00215.65
7.0.170.0140.01015.63
7.0.160.0090.00915.58
7.0.150.0170.00715.29
7.0.140.0100.01818.58
7.0.130.0140.00515.57
7.0.120.0060.01115.31
7.0.110.0040.01315.66
7.0.100.0120.00615.52
7.0.90.0180.00515.52
7.0.80.0160.00315.32
7.0.70.0160.00515.59
7.0.60.0220.04217.82
7.0.50.0120.04316.86
7.0.40.0080.03816.77
7.0.30.0210.03016.79
7.0.20.0250.04116.86
7.0.10.0090.02516.79
7.0.00.0100.04316.86
hhvm-3.22.00.1190.13090.57
hhvm-3.21.30.1080.15989.93
hhvm-3.21.00.1100.13490.61
hhvm-3.20.20.1210.12689.94
hhvm-3.19.20.0970.11389.36
hhvm-3.18.50.1090.12788.98
hhvm-3.18.40.0860.14589.08
hhvm-3.17.30.0950.13687.27
hhvm-3.15.40.0640.13084.75
hhvm-3.13.20.1150.12996.32
hhvm-3.12.140.1060.13395.60
hhvm-3.11.10.1430.11187.78
hhvm-3.10.10.0660.12784.68
5.6.380.0150.00714.41
5.6.370.0120.00614.17
5.6.360.0110.00614.51
5.6.350.0160.00314.16
5.6.340.0190.00014.64
5.6.330.0190.01014.49
5.6.320.0140.00514.59
5.6.310.0150.00014.21
5.6.300.0100.01014.60
5.6.290.0080.00614.10
5.6.280.0140.03917.70
5.6.270.0160.00814.32
5.6.260.0130.00414.27
5.6.250.0110.01114.50
5.6.240.0090.00214.37
5.6.230.0140.00314.11
5.6.220.0100.00614.41
5.6.210.0100.04217.43
5.6.200.0070.04116.40
5.6.190.0120.04117.44
5.6.180.0200.04017.38
5.6.170.0190.02317.57
5.6.160.0050.05017.48
5.6.150.0150.03516.31
5.6.140.0140.02216.29
5.6.130.0090.04016.40
5.6.120.0130.03917.77
5.6.110.0100.02017.79
5.6.100.0110.04017.74
5.6.90.0110.04217.80
5.6.80.0090.03117.44
5.6.70.0100.00514.25
5.6.60.0110.00414.39
5.6.50.0140.00014.35
5.6.40.0080.00814.34
5.6.30.0140.00314.25
5.6.20.0100.00314.20
5.6.10.0040.01214.51
5.6.00.0040.00814.15
5.5.380.0130.00312.79
5.5.370.0070.00712.79
5.5.360.0080.00512.79
5.5.350.1720.02016.70
5.5.340.0100.04215.41
5.5.330.0060.03416.49
5.5.320.0140.04616.61
5.5.310.0200.04416.56
5.5.300.0070.04215.45
5.5.290.0060.04515.50
5.5.280.0040.04716.88
5.5.270.0110.04216.83
5.5.260.0120.04016.87
5.5.250.0030.02616.71
5.5.240.0210.03516.53
5.5.230.0080.00512.79
5.5.220.0080.00312.79
5.5.210.0080.00512.79
5.5.200.0100.00312.79
5.5.190.0060.00612.79
5.5.180.0090.00512.79
5.5.170.0090.01313.84
5.5.160.0100.00012.79
5.5.150.0030.01012.79
5.5.140.0110.00412.79
5.5.130.0070.00712.79
5.5.120.0110.00412.79
5.5.110.0040.00912.79
5.5.100.0080.00812.79
5.5.90.0100.00012.79
5.5.80.0080.00812.79
5.5.70.0140.00312.79
5.5.60.0070.00712.79
5.5.50.0080.00312.79
5.5.40.0060.00612.79
5.5.30.0070.00712.79
5.5.20.0040.00812.79
5.5.10.0090.00412.79
5.5.00.0070.00412.79
5.4.450.0440.02816.09
5.4.440.0110.02816.05
5.4.430.0320.03216.17
5.4.420.0170.02816.13
5.4.410.0370.03316.15
5.4.400.0080.02816.05
5.4.390.0270.03316.00
5.4.380.0160.02715.81
5.4.370.0030.03715.78
5.4.360.0130.02715.80
5.4.350.0180.02515.66
5.4.340.0140.02515.75
5.4.330.0080.00412.79
5.4.320.0110.03015.77
5.4.310.0220.02715.66
5.4.300.0170.02515.78
5.4.290.0140.02915.63
5.4.280.0110.03215.76
5.4.270.0140.02815.69
5.4.260.0070.03615.68
5.4.250.0080.03315.63
5.4.240.0160.03515.71
5.4.230.0140.03815.75
5.4.220.0120.04215.72
5.4.210.0120.02815.69
5.4.200.0170.02814.75
5.4.190.0130.02815.80
5.4.180.0140.03415.70
5.4.170.0130.03615.73
5.4.160.0130.02815.78
5.4.150.0150.03515.78
5.4.140.0080.03114.51
5.4.130.0100.02714.50
5.4.120.0160.03014.52
5.4.110.0050.03214.60
5.4.100.0160.02514.61
5.4.90.0190.02914.58
5.4.80.0130.02714.49
5.4.70.0160.02814.55
5.4.60.0130.02714.49
5.4.50.0120.02714.47
5.4.40.0070.03314.51
5.4.30.0100.03014.48
5.4.20.0100.03514.52
5.4.10.0150.02614.46
5.4.00.0110.02714.21
5.3.290.0150.02813.78
5.3.280.0160.03113.69
5.3.270.0150.02713.71
5.3.260.0090.03913.71
5.3.250.0120.03113.69
5.3.240.0090.03313.71
5.3.230.0130.03913.74
5.3.220.0120.04013.67
5.3.210.0120.03313.69
5.3.200.0130.03113.68
5.3.190.0110.02913.78
5.3.180.0110.02913.70
5.3.170.0170.02513.78
5.3.160.0140.02813.70
5.3.150.0120.03713.70
5.3.140.0160.02513.67
5.3.130.0110.03313.72
5.3.120.0100.04013.73
5.3.110.0100.03013.68
5.3.100.0170.02313.45
5.3.90.0060.03413.49
5.3.80.0100.03513.48
5.3.70.0100.03813.51
5.3.60.0100.02813.43
5.3.50.0110.02513.48
5.3.40.0190.02113.47
5.3.30.0070.03013.40
5.3.20.0070.03213.29
5.3.10.0120.02413.33
5.3.00.0070.03513.20
5.2.170.0080.03411.98
5.2.160.0070.02611.99
5.2.150.0080.02311.96
5.2.140.0100.02111.98
5.2.130.0080.02311.94
5.2.120.0110.02112.01
5.2.110.0070.02511.96
5.2.100.0080.02312.06
5.2.90.0130.02011.99
5.2.80.0050.02812.05
5.2.70.0130.02311.95
5.2.60.0150.02711.97
5.2.50.0070.03011.95
5.2.40.0100.02311.99
5.2.30.0100.02011.98
5.2.20.0080.02211.98
5.2.10.0110.02011.88
5.2.00.0120.02211.76
5.1.60.0050.02011.43
5.1.50.0060.02311.39
5.1.40.0110.01611.42
5.1.30.0110.01711.59
5.1.20.0070.02011.63
5.1.10.0070.02211.42
5.1.00.0030.02311.44
5.0.50.0060.01710.69
5.0.40.0030.01810.71
5.0.30.0090.02010.54
5.0.20.0060.01310.60
5.0.10.0030.01710.51
5.0.00.0080.01910.49
4.4.90.0070.0109.37
4.4.80.0020.0169.35
4.4.70.0040.0149.36
4.4.60.0060.0119.35
4.4.50.0070.0129.39
4.4.40.0060.0209.34
4.4.30.0030.0139.34
4.4.20.0060.0129.40
4.4.10.0050.0129.42
4.4.00.0080.0169.35
4.3.110.0040.0139.37
4.3.100.0030.0179.34
4.3.90.0030.0149.34
4.3.80.0000.0219.32
4.3.70.0060.0159.29
4.3.60.0040.0149.34
4.3.50.0060.0119.34
4.3.40.0050.0189.28
4.3.30.0030.0138.74
4.3.20.0040.0128.73
4.3.10.0040.0178.65
4.3.00.0000.01510.19