3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convert($input) { $oldMin = 0; $oldMax = 1; $newMin = 127; $newMax = 0; return ceil(((($input- $oldMin) * ($newMax - $newMin)) / ($oldMax - $oldMin)) + $newMin); } foreach (range(0,1,1/1000) as $input) { convert($intput); }

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.0120.00616.50
8.3.50.0100.00922.93
8.3.40.0120.00318.65
8.3.30.0110.00319.07
8.3.20.0080.00020.07
8.3.10.0040.00423.65
8.3.00.0000.00817.75
8.2.180.0090.00916.75
8.2.170.0100.01022.96
8.2.160.0030.01020.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0090.00021.22
8.2.110.0090.00022.43
8.2.100.0060.00618.03
8.2.90.0040.00719.17
8.2.80.0060.00317.97
8.2.70.0030.00617.50
8.2.60.0030.00617.93
8.2.50.0060.00318.07
8.2.40.0060.00319.94
8.2.30.0030.00618.20
8.2.20.0000.00817.79
8.2.10.0040.00418.26
8.2.00.0030.00617.82
8.1.280.0100.00725.92
8.1.270.0060.00323.91
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0050.00524.04
8.1.230.0140.00019.12
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0040.00817.38
8.1.190.0050.00317.25
8.1.180.0060.00318.10
8.1.170.0040.00418.79
8.1.160.0030.00522.16
8.1.150.0040.00419.01
8.1.140.0060.00317.52
8.1.130.0030.00317.86
8.1.120.0070.00017.55
8.1.110.0000.00817.63
8.1.100.0050.00317.60
8.1.90.0030.00417.49
8.1.80.0000.00717.57
8.1.70.0030.00317.42
8.1.60.0000.00817.61
8.1.50.0050.00317.59
8.1.40.0000.00817.56
8.1.30.0000.00917.80
8.1.20.0000.00817.62
8.1.10.0050.00317.66
8.1.00.0040.00417.51
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0050.00318.47
8.0.270.0050.00317.29
8.0.260.0030.00317.22
8.0.250.0030.00417.01
8.0.240.0080.00017.10
8.0.230.0050.00216.85
8.0.220.0070.00016.88
8.0.210.0000.00716.89
8.0.200.0040.00417.03
8.0.190.0030.00316.94
8.0.180.0080.00017.00
8.0.170.0060.00316.96
8.0.160.0000.00716.93
8.0.150.0030.00616.82
8.0.140.0040.00416.92
8.0.130.0060.00013.52
8.0.120.0050.00316.93
8.0.110.0050.00316.93
8.0.100.0040.00416.87
8.0.90.0030.00416.90
8.0.80.0030.01316.94
8.0.70.0040.00416.80
8.0.60.0040.00416.94
8.0.50.0000.00716.82
8.0.30.0150.00817.02
8.0.20.0170.00817.40
8.0.10.0040.00417.05
8.0.00.0120.01116.74
7.4.330.0030.00315.26
7.4.320.0070.00016.48
7.4.300.0000.00716.37
7.4.290.0040.00416.47
7.4.280.0000.00816.52
7.4.270.0000.00716.50
7.4.260.0030.00316.48
7.4.250.0030.00516.42
7.4.240.0020.00616.45
7.4.230.0040.00416.36
7.4.220.0070.01116.61
7.4.210.0070.01116.41
7.4.200.0000.00716.59
7.4.160.0150.00616.41
7.4.150.0100.01017.40
7.4.140.0110.01017.86
7.4.130.0150.00416.48
7.4.120.0150.01516.65
7.4.110.0060.01816.57
7.4.100.0090.01716.48
7.4.90.0100.01016.44
7.4.80.0180.00619.39
7.4.70.0130.01016.57
7.4.60.0110.01416.56
7.4.50.0060.00316.64
7.4.40.0030.01416.60
7.4.30.0140.00716.68
7.4.00.0110.00715.02
7.3.330.0000.00613.23
7.3.320.0050.00013.44
7.3.310.0000.00716.23
7.3.300.0030.00316.37
7.3.290.0130.00616.33
7.3.280.0060.01016.38
7.3.270.0380.02517.40
7.3.260.0140.01816.37
7.3.250.0110.01016.48
7.3.240.0200.00616.39
7.3.230.0070.01516.57
7.3.210.0170.00916.41
7.3.200.0130.00619.39
7.3.190.0090.00916.33
7.3.180.0120.01216.60
7.3.170.0160.00316.49
7.3.160.0100.00716.32
7.2.330.0100.01316.82
7.2.320.0070.01816.65
7.2.310.0130.01316.71
7.2.300.0150.01516.59
7.2.290.0170.00316.86
7.2.110.0150.00316.57
7.2.80.0030.01016.71
7.2.60.0030.00716.82
7.2.00.0070.00719.35
7.1.200.0090.00615.61
7.1.70.0070.00716.93
7.1.60.0030.00717.34
7.1.50.0160.00617.18
7.1.00.0100.07022.26
7.0.200.0090.00617.01
7.0.140.0000.07722.00
7.0.60.0000.04319.98
7.0.50.0130.04017.86
7.0.40.0030.05719.90
7.0.30.0300.07719.92
7.0.20.0230.06719.92
7.0.10.0070.04019.88
7.0.00.0100.08319.80
5.6.280.0070.06721.21
5.6.210.0100.08320.85
5.6.200.0030.04018.23
5.6.190.0100.08320.53
5.6.180.0270.05320.50
5.6.170.0200.07720.49
5.6.160.0070.03720.49
5.6.150.0130.06018.28
5.6.140.0070.07318.25
5.6.130.0070.08018.30
5.6.120.0070.05721.17
5.6.110.0070.08321.25
5.6.100.0030.04721.12
5.6.90.0130.03721.11
5.6.80.0030.08320.68
5.5.350.0230.03720.61
5.5.340.0100.08018.09
5.5.330.0030.09020.16
5.5.320.0270.05320.27
5.5.310.0270.08020.37
5.5.300.0000.07318.18
5.5.290.0070.08718.06
5.5.280.0070.08721.01
5.5.270.0030.06720.90
5.5.260.0170.05320.94
5.5.250.0170.07320.75
5.5.240.0230.07320.29
5.4.450.0400.06019.39
5.4.440.0270.08019.52
5.4.430.0230.07319.47
5.4.420.0270.07319.61
5.4.410.0270.07019.26
5.4.400.0300.04319.16
5.4.390.3630.03719.30
5.4.380.0400.06319.14
5.4.370.0300.04719.14
5.4.360.0330.06019.07
5.4.350.0330.07018.91
5.4.340.0230.06719.31
5.4.320.0140.05112.64
5.4.310.0110.03812.64
5.4.300.0110.04512.64
5.4.290.0110.03812.63
5.4.280.0100.04412.53
5.4.270.0110.03412.53
5.4.260.0070.04012.53
5.4.250.0100.03712.54
5.4.240.0100.05012.54
5.4.230.0040.05012.52
5.4.220.0050.04112.53
5.4.210.0080.03712.52
5.4.200.0110.03612.52
5.4.190.0050.04012.52
5.4.180.0070.03812.52
5.4.170.0050.04212.52
5.4.160.0060.03912.52
5.4.150.0100.03512.52
5.4.140.0100.03612.20
5.4.130.0040.04112.19
5.4.120.0080.03612.15
5.4.110.0050.04012.14
5.4.100.0040.04112.15
5.4.90.0100.03712.14
5.4.80.0120.03512.15
5.4.70.0090.04212.14
5.4.60.0070.04012.14
5.4.50.0090.04012.14
5.4.40.0080.03512.13
5.4.30.0030.04112.13
5.4.20.0070.03712.13
5.4.10.0060.03612.12
5.4.00.0060.03811.61

preferences:
40.47 ms | 401 KiB | 5 Q