3v4l.org

run code in 300+ PHP versions simultaneously
<?php $weight = $_POST["txtWeight"]; $height = $_POST["txtHeight"]; $unit = $_POST["optUnit"]; $message = ""; if($unit == "metric") { $bmiCalc = $weight/($height*$height); #This Line $message = "Metric BMI: $bmiCalc"; } else { $bmiCalc = ($weight * 703)/($height * $height); $message = "Imperial BMI: $bmiCalc"; }

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.01018.55
8.3.50.0070.00921.08
8.3.40.0190.00318.67
8.3.30.0110.00420.30
8.3.20.0070.00020.07
8.3.10.0100.00021.91
8.3.00.0080.00022.64
8.2.180.0120.00316.63
8.2.170.0060.01222.96
8.2.160.0120.00320.50
8.2.150.0000.00924.18
8.2.140.0030.01724.66
8.2.130.0070.01026.16
8.2.120.0040.00419.79
8.2.110.0030.00622.11
8.2.100.0100.00617.47
8.2.90.0050.00319.34
8.2.80.0000.00819.38
8.2.70.0080.00017.63
8.2.60.0040.00418.03
8.2.50.0000.00818.07
8.2.40.0040.00418.03
8.2.30.0000.00718.06
8.2.20.0000.00717.64
8.2.10.0040.00417.80
8.2.00.0040.00417.88
8.1.280.0070.00725.92
8.1.270.0030.00620.40
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00323.81
8.1.230.0070.00319.06
8.1.220.0030.00717.79
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00617.53
8.1.180.0000.00819.14
8.1.170.0060.00318.58
8.1.160.0070.00022.07
8.1.150.0070.00018.65
8.1.140.0080.00017.45
8.1.130.0000.00717.32
8.1.120.0030.00417.36
8.1.110.0000.00817.48
8.1.100.0050.00317.47
8.1.90.0040.00417.47
8.1.80.0040.00417.36
8.1.70.0030.00617.44
8.1.60.0000.00817.65
8.1.50.0040.00417.56
8.1.40.0040.00417.61
8.1.30.0040.00417.52
8.1.20.0030.00617.54
8.1.10.0040.00417.46
8.1.00.0000.00817.39
8.0.300.0070.00018.77
8.0.290.0030.00317.18
8.0.280.0000.00718.37
8.0.270.0030.00317.26
8.0.260.0030.00316.84
8.0.250.0030.00316.93
8.0.240.0040.00416.97
8.0.230.0050.00216.90
8.0.220.0030.00316.83
8.0.210.0030.00316.85
8.0.200.0030.00316.92
8.0.190.0030.00316.95
8.0.180.0030.00616.88
8.0.170.0000.00817.02
8.0.160.0040.00316.95
8.0.150.0040.00316.97
8.0.140.0090.00016.80
8.0.130.0000.00613.31
8.0.120.0000.00816.91
8.0.110.0070.00016.96
8.0.100.0040.00417.00
8.0.90.0040.00416.83
8.0.80.0060.01016.91
8.0.70.0000.00716.89
8.0.60.0000.00716.93
8.0.50.0030.00416.84
8.0.30.0150.00717.23
8.0.20.0100.01117.40
8.0.10.0070.00017.07
8.0.00.0110.00716.87
7.4.330.0000.00515.00
7.4.320.0000.00716.36
7.4.300.0030.00316.53
7.4.290.0030.00316.39
7.4.280.0040.00416.54
7.4.270.0000.00716.55
7.4.260.0070.00016.59
7.4.250.0000.00716.45
7.4.240.0030.00316.51
7.4.230.0070.00016.53
7.4.220.0100.00716.51
7.4.210.0050.00916.59
7.4.200.0070.00016.67
7.4.190.0000.00716.45
7.4.160.0030.01316.39
7.4.150.0090.00917.40
7.4.140.0080.01017.86
7.4.130.0120.00916.47
7.4.120.0120.00716.51
7.4.110.0080.01216.59
7.4.100.0090.01216.52
7.4.90.0070.01016.49
7.4.80.0090.01219.39
7.4.70.0070.01016.48
7.4.60.0060.00916.43
7.4.50.0030.00616.54
7.4.40.0040.01122.77
7.4.30.0080.01116.49
7.4.00.0100.00315.07
7.3.330.0060.00013.29
7.3.320.0000.00513.17
7.3.310.0050.00316.39
7.3.300.0030.00316.22
7.3.290.0100.01016.39
7.3.280.0080.00816.42
7.3.270.0100.01017.40
7.3.260.0140.00316.42
7.3.250.0100.00716.38
7.3.240.0030.01316.53
7.3.230.0040.01316.39
7.3.210.0070.01016.42
7.3.200.0150.00419.39
7.3.190.0090.01216.45
7.3.180.0100.00616.58
7.3.170.0100.00716.50
7.3.160.0060.00916.56
7.3.120.0080.00814.89
7.3.10.0070.01116.72
7.3.00.0120.00316.86
7.2.330.0040.01416.66
7.2.320.0190.00016.76
7.2.310.0130.00316.66
7.2.300.0170.00316.66
7.2.290.0180.00316.47
7.2.130.0170.00016.99
7.2.120.0000.01416.95
7.2.110.0040.01116.70
7.2.100.0070.00717.00
7.2.90.0090.00616.67
7.2.80.0070.00317.00
7.2.70.0040.01216.67
7.2.60.0060.00816.89
7.2.50.0120.00716.61
7.2.40.0160.00316.87
7.2.30.0090.00616.88
7.2.20.0060.00917.02
7.2.10.0100.00316.94
7.2.00.0080.00618.14
7.1.250.0100.00015.92
7.1.200.0090.00615.93
7.1.100.0070.00318.25
7.1.70.0030.00517.30
7.1.60.0090.01319.40
7.1.50.0090.00316.89
7.1.00.0030.07022.46
7.0.200.0000.00916.46
7.0.140.0070.07022.13
7.0.70.4030.03320.00
7.0.60.0130.06319.87
7.0.50.0130.06717.90
7.0.40.0070.08720.20
7.0.30.0230.04720.20
7.0.20.0300.07720.33
7.0.10.0100.04720.18
7.0.00.0030.04020.16
5.6.280.0030.09720.92
5.6.210.0030.06020.55
5.6.200.0030.07318.12
5.6.190.0000.07320.43
5.6.180.0230.07020.67
5.6.170.0230.07020.40
5.6.160.0030.06720.38
5.6.150.0030.06718.19
5.6.140.0170.07018.21
5.6.130.0070.05718.15
5.6.120.0100.08320.98
5.6.110.0030.08721.11
5.6.100.0100.03320.93
5.6.90.0100.05021.01
5.6.80.0070.07720.41
5.6.70.0270.07320.27
5.5.350.0070.05720.38
5.5.340.0000.05318.00
5.5.330.0130.08020.57
5.5.320.0070.07720.21
5.5.310.0130.06720.17
5.5.300.0000.07018.00
5.5.290.0100.07718.01
5.5.280.0030.07720.87
5.5.270.0030.05320.78
5.5.260.0130.08020.87
5.5.250.0000.06720.65
5.5.240.0030.04320.18
5.4.450.0270.06319.48
5.4.440.0700.06019.24
5.4.430.0800.05019.09
5.4.420.0870.05319.58
5.4.410.0100.05319.42
5.4.400.0930.05719.30
5.4.390.0900.05718.99
5.4.380.0200.05318.68
5.4.370.0070.03718.46
5.4.360.0030.04718.71
5.4.350.0050.03911.97
5.4.340.0090.03811.97
5.4.320.0100.03312.45
5.4.310.0060.03812.45
5.4.300.0050.04412.45
5.4.290.0100.03712.45
5.4.280.0060.04112.35
5.4.270.0090.04612.35
5.4.260.0110.04612.35
5.4.250.0200.04718.71
5.4.240.0130.04318.77
5.4.230.0030.08018.92
5.4.220.0100.05718.86
5.4.210.0130.05018.71
5.4.200.0170.04718.84
5.4.190.0100.06718.89
5.4.180.0100.05018.91
5.4.170.0130.05718.84
5.4.160.0130.05018.66
5.4.150.0030.06018.83
5.4.140.0000.08016.26
5.4.130.0100.05316.45
5.4.120.0070.05716.45
5.4.110.0030.05716.40
5.4.100.0030.05316.47
5.4.90.0070.05716.10
5.4.80.0100.05316.42
5.4.70.0170.04716.13
5.4.60.0100.05316.12
5.4.50.0070.05316.16
5.4.40.0100.05016.21
5.4.30.0100.04716.11
5.4.20.0100.04716.14
5.4.10.0130.04716.24
5.4.00.0070.07015.86
5.3.290.0070.04012.80
5.3.280.0170.05714.29
5.3.270.0170.05714.70
5.3.260.0170.05014.44
5.3.250.0070.05014.62
5.3.240.0070.05014.62
5.3.230.0100.05014.48
5.3.220.0100.05014.44
5.3.210.0070.05714.26
5.3.200.0130.04714.56
5.3.190.0200.05314.34
5.3.180.0170.06314.45
5.3.170.0030.05714.66
5.3.160.0070.05714.58
5.3.150.0100.05014.61
5.3.140.0100.04714.57
5.3.130.0070.05314.64
5.3.120.0100.05714.55
5.3.110.0100.05314.38
5.3.100.0070.06714.05
5.3.90.0070.05014.04
5.3.80.0070.05013.79
5.3.70.0100.04713.96
5.3.60.0070.07313.94
5.3.50.0130.06014.10
5.3.40.0130.05314.04
5.3.30.0070.06313.95
5.3.20.0070.05713.70
5.3.10.0030.07313.42
5.3.00.0130.05013.66
5.2.170.0000.05011.03
5.2.160.0100.04710.93
5.2.150.0030.04711.06
5.2.140.0000.04711.07
5.2.130.0000.04311.02
5.2.120.0170.02710.86
5.2.110.0130.04710.93
5.2.100.0070.05010.98
5.2.90.0100.05310.98
5.2.80.0130.05311.11
5.2.70.0070.04311.11
5.2.60.0130.03311.17
5.2.50.0130.03311.11
5.2.40.0100.03710.93
5.2.30.0070.04010.98
5.2.20.0070.05310.84
5.2.10.0070.04010.86
5.2.00.0070.03710.60
5.1.60.0070.03310.03
5.1.50.0100.03310.03
5.1.40.0070.03010.04
5.1.30.0030.03310.34
5.1.20.0100.03310.43
5.1.10.0070.0339.99
5.1.00.0070.03010.00
5.0.50.0030.0378.58
5.0.40.0030.0278.64
5.0.30.0030.0478.07
5.0.20.0130.0178.34
5.0.10.0070.0378.20
5.0.00.0000.0438.15
4.4.90.0030.0307.34
4.4.80.0030.0277.34
4.4.70.0030.0277.34
4.4.60.0000.0307.34
4.4.50.0000.0237.34
4.4.40.0070.0277.34
4.4.30.0000.0237.34
4.4.20.0000.0237.34
4.4.10.0070.0177.34
4.4.00.0000.0377.34
4.3.110.0030.0207.34
4.3.100.0030.0237.34
4.3.90.0100.0137.34
4.3.80.0030.0307.34
4.3.70.0070.0177.34
4.3.60.0030.0207.34
4.3.50.0000.0237.34
4.3.40.0000.0337.34
4.3.30.0000.0277.34
4.3.20.0000.0237.34
4.3.10.0000.0207.34
4.3.00.0030.0237.30

preferences:
77.86 ms | 401 KiB | 5 Q