3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HashUtil { const MULTIPLIER = 44928000; const NORMAL_BASE = 10; const TARGET_BASE = 31; public static function encode($entityId) { return base_convert($entityId ^ self::MULTIPLIER, self::NORMAL_BASE, self::TARGET_BASE); } public static function decode($hash) { return intval($hash, self::TARGET_BASE) ^ self::MULTIPLIER; } } ?>

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.0070.00716.63
8.3.50.0100.01016.59
8.3.40.0040.01118.34
8.3.30.0100.00718.54
8.3.20.0080.00020.29
8.3.10.0070.00023.61
8.3.00.0040.00422.45
8.2.180.0100.01317.96
8.2.170.0120.00322.96
8.2.160.0090.00520.39
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00017.38
8.2.110.0040.00819.19
8.2.100.0040.00817.50
8.2.90.0000.00719.09
8.2.80.0040.00417.97
8.2.70.0000.00917.50
8.2.60.0050.00317.78
8.2.50.0080.00018.07
8.2.40.0000.00820.98
8.2.30.0040.00418.01
8.2.20.0040.00417.46
8.2.10.0050.00317.97
8.2.00.0050.00317.98
8.1.280.0070.00725.92
8.1.270.0050.00320.37
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.01023.92
8.1.230.0090.00317.43
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.11
8.1.190.0050.00317.22
8.1.180.0030.00518.10
8.1.170.0040.00418.39
8.1.160.0030.00723.61
8.1.150.0030.00518.72
8.1.140.0030.00517.29
8.1.130.0000.01017.59
8.1.120.0000.00717.40
8.1.110.0000.00717.36
8.1.100.0050.00317.37
8.1.90.0080.00017.30
8.1.80.0030.00617.29
8.1.70.0000.00717.39
8.1.60.0080.00017.44
8.1.50.0000.00817.35
8.1.40.0040.00417.38
8.1.30.0060.00617.54
8.1.20.0030.00617.44
8.1.10.0040.00417.41
8.1.00.0000.00817.32
8.0.300.0060.00318.77
8.0.290.0040.00416.63
8.0.280.0000.00718.24
8.0.270.0030.00317.13
8.0.260.0030.00317.14
8.0.250.0040.00416.87
8.0.240.0030.00316.73
8.0.230.0030.00416.72
8.0.220.0070.00016.81
8.0.210.0000.00816.73
8.0.200.0000.00616.87
8.0.190.0000.00816.88
8.0.180.0000.00716.72
8.0.170.0080.00016.72
8.0.160.0040.00416.70
8.0.150.0000.00716.77
8.0.140.0040.00416.68
8.0.130.0050.00513.23
8.0.120.0040.00416.71
8.0.110.0040.00416.68
8.0.100.0000.00716.58
8.0.90.0000.00716.72
8.0.80.0090.00616.72
8.0.70.0000.00816.64
8.0.60.0070.00016.73
8.0.50.0030.00616.62
8.0.30.0090.00616.87
8.0.20.0110.00717.40
8.0.10.0000.00716.77
8.0.00.0110.00816.65
7.4.330.0000.00615.08
7.4.320.0000.00616.38
7.4.300.0060.00016.30
7.4.290.0000.00716.46
7.4.280.0050.00316.22
7.4.270.0030.00316.50
7.4.260.0000.00716.48
7.4.250.0040.00416.39
7.4.240.0000.00716.42
7.4.230.0000.00716.51
7.4.220.0100.01016.51
7.4.210.0060.01016.51
7.4.200.0040.00416.22
7.4.160.0060.01016.11
7.4.150.0100.00717.40
7.4.140.0080.01017.86
7.4.130.0120.00616.42
7.4.120.0090.00916.39
7.4.110.0060.01016.44
7.4.100.0090.01216.43
7.4.90.0090.00916.35
7.4.80.0120.00619.39
7.4.70.0120.00616.50
7.4.60.0090.00916.39
7.4.50.0040.00416.23
7.4.40.0070.01016.39
7.4.30.0200.00416.43
7.4.00.0090.00614.85
7.3.330.0030.00313.01
7.3.320.0000.00513.26
7.3.310.0040.00416.23
7.3.300.0000.00616.23
7.3.290.0050.00216.19
7.3.280.0100.00916.19
7.3.270.0030.01417.40
7.3.260.0090.00916.25
7.3.250.0130.00416.37
7.3.240.0140.00316.17
7.3.230.0130.00416.39
7.3.210.0110.00616.31
7.3.200.0070.01419.39
7.3.190.0180.00316.37
7.3.180.0030.01316.07
7.3.170.0140.00316.47
7.3.160.0100.01016.30
7.2.330.0120.00616.32
7.2.320.0110.00616.14
7.2.310.0110.00616.65
7.2.300.0310.01916.54
7.2.290.0070.01016.46
7.2.00.0150.00318.68
7.1.100.0050.00518.05
7.1.70.0100.00716.94
7.1.60.0070.01720.03
7.1.50.0130.01016.89
7.1.00.0000.08022.47
7.0.200.0230.00714.97
7.0.110.0100.07319.85
7.0.100.0100.07320.09
7.0.90.0100.08019.94
7.0.80.0000.04319.86
7.0.70.0070.04019.90
7.0.60.0170.04019.97
7.0.50.0200.04720.48
7.0.40.0100.03320.25
7.0.30.0030.04320.25
7.0.20.0070.04319.95
7.0.10.0070.05320.15
7.0.00.0030.06720.02
5.6.280.0000.05721.05
5.6.260.0070.07720.70
5.6.250.0100.08320.87
5.6.240.0070.08320.68
5.6.230.0070.04720.86
5.6.220.0100.07020.57
5.6.210.0000.04320.40
5.6.200.0030.04021.12
5.6.190.0000.06021.09
5.6.180.0070.04721.18
5.6.170.0100.03720.99
5.6.160.0100.03721.28
5.6.150.0000.04320.94
5.6.140.0070.04020.99
5.6.130.0070.04021.03
5.6.120.0100.06021.20
5.6.110.0100.06321.26
5.6.100.0070.04021.14
5.6.90.0100.03721.03
5.6.80.0030.04320.46
5.6.70.0070.04320.40
5.6.60.0000.04320.36
5.6.50.0000.04720.34
5.6.40.0070.04320.48
5.6.30.0070.03320.45
5.6.20.0070.04720.38
5.6.10.0070.03720.29
5.6.00.0070.03720.29
5.5.380.0130.07720.55
5.5.370.0070.05720.25
5.5.360.0070.04020.34
5.5.350.0030.04720.16
5.5.340.0000.04720.89
5.5.330.0030.04020.79
5.5.320.0170.03021.03
5.5.310.0030.04020.84
5.5.300.0030.04020.96
5.5.290.0030.04020.89
5.5.280.0000.04320.83
5.5.270.0130.03320.92
5.5.260.0000.04321.01
5.5.250.0000.04320.61
5.5.240.0000.04320.38
5.5.230.0000.04320.28
5.5.220.0030.04020.41
5.5.210.0070.03720.25
5.5.200.0070.04020.10
5.5.190.0000.04320.32
5.5.180.0070.03720.26
5.5.160.0070.06720.34
5.5.150.0100.07020.16
5.5.140.0070.05720.32
5.5.130.0030.08020.30
5.5.120.0030.07720.25
5.5.110.0030.07720.09
5.5.100.0130.07320.26
5.5.90.0070.07320.25
5.5.80.0130.07720.20
5.5.70.0170.06720.14
5.5.60.0100.07320.01
5.5.50.0000.08020.11
5.5.40.0070.08020.26
5.5.30.0130.07720.17
5.5.20.0100.04720.16
5.5.10.0070.07720.20
5.5.00.0170.06320.19
5.4.450.0030.04019.30
5.4.440.0000.06019.33
5.4.430.0000.04019.27
5.4.420.0000.04319.41
5.4.410.0070.05719.38
5.4.400.0000.04018.99
5.4.390.0000.04019.11
5.4.380.0030.03719.24
5.4.370.0000.04018.95
5.4.360.0070.03319.18
5.4.350.0000.04019.03
5.4.340.0100.06718.95
5.4.320.0030.05019.23
5.4.310.0100.05019.24
5.4.300.0070.06019.23
5.4.290.0000.04319.31
5.4.280.0030.07719.24
5.4.270.0070.05718.95
5.4.260.0170.06719.01
5.4.250.0070.07319.34
5.4.240.0070.07719.18
5.4.230.0070.07719.02
5.4.220.0170.06719.13
5.4.210.0070.04719.16
5.4.200.0100.07319.30
5.4.190.0170.06318.97
5.4.180.0000.04318.97
5.4.170.0100.04719.20
5.4.160.0070.07718.96
5.4.150.0070.08018.98
5.4.140.0000.08016.30
5.4.130.0100.07316.52
5.4.120.0100.06716.59
5.4.110.0100.06716.43
5.4.100.0070.04316.41
5.4.90.0200.06316.57
5.4.80.0030.07316.45
5.4.70.0100.07016.55
5.4.60.0170.06716.52
5.4.50.0100.06716.47
5.4.40.0030.07016.43
5.4.30.0130.07016.52
5.4.20.0000.07316.50
5.4.10.0070.07016.23
5.4.00.0070.07716.00

preferences:
52.4 ms | 400 KiB | 5 Q