3v4l.org

run code in 300+ PHP versions simultaneously
<?php ?> <form name="tempConvert" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?>"> <table> <tr> <td>Enter value to convert</td> <td><input type="text" name="valueConvert" id="valueConvert" size="15"></td> </tr> <tr> <td>Convert to:</td> <td><select name="convertType" id="convertType" size="1"> <option disabled> Select a measurement type</option> <option value="celsius">Celsius</option> <option value="fahrenheit">Fahrenheit</option> </select> </td> </tr> <tr> <td><input type="submit" name="btnConvert" id="btnConvert" value="Convert"></td> <td><input type="reset" name="btnReset" id="btnReset" value="Reset"></td> </tr> </form> <?php function tempConvert($value, $type){ if($type== "fahrenheit"){ return (((9/5)*$value) +(32)); } elseif ($type== "celsius"){ return (($valueConvert - 32) * (9/5)); } } if (isset($_POST['btnConvert'])) { $valueConvert = $_POST['valueConvert']; $convertType = $_POST['convertType']; echo "The initial temperature was $valueConvert. The new temperature is tempConvert($valueConvert, $convertType)."; } ?>

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.0060.00918.18
8.3.50.0090.00921.21
8.3.40.0110.00618.71
8.3.30.0040.01119.16
8.3.20.0050.00320.35
8.3.10.0050.00323.74
8.3.00.0050.00319.25
8.2.180.0030.01316.75
8.2.170.0000.01522.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00722.07
8.2.110.0090.00022.20
8.2.100.0090.00317.75
8.2.90.0000.00719.10
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0040.00418.04
8.2.50.0040.00418.07
8.2.40.0000.00818.24
8.2.30.0000.00718.14
8.2.20.0050.00317.75
8.2.10.0070.00018.10
8.2.00.0040.00417.70
8.1.280.0120.00325.92
8.1.270.0000.00823.71
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.97
8.1.230.0040.00719.10
8.1.220.0050.00317.76
8.1.210.0060.00318.77
8.1.200.0090.00017.25
8.1.190.0000.00917.36
8.1.180.0080.00018.10
8.1.170.0040.00420.43
8.1.160.0050.00322.03
8.1.150.0040.00418.71
8.1.140.0000.00717.45
8.1.130.0030.00517.65
8.1.120.0050.00217.38
8.1.110.0000.00717.38
8.1.100.0050.00317.31
8.1.90.0040.00417.34
8.1.80.0000.00717.39
8.1.70.0050.00317.34
8.1.60.0040.00417.55
8.1.50.0040.00417.48
8.1.40.0040.00417.33
8.1.30.0080.00017.60
8.1.20.0040.00417.56
8.1.10.0060.00317.54
8.1.00.0040.00417.53
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00318.41
8.0.270.0000.00817.20
8.0.260.0040.00417.08
8.0.250.0000.00716.82
8.0.240.0090.00016.82
8.0.230.0000.00716.79
8.0.220.0030.00616.88
8.0.210.0000.00716.84
8.0.200.0070.00016.83
8.0.190.0000.00816.93
8.0.180.0030.00616.87
8.0.170.0070.00016.89
8.0.160.0070.00016.82
8.0.150.0070.00016.79
8.0.140.0100.00016.75
8.0.130.0000.00613.29
8.0.120.0080.00016.86
8.0.110.0050.00516.85
8.0.100.0070.00016.84
8.0.90.0000.00816.86
8.0.80.0120.00416.88
8.0.70.0000.00716.89
8.0.60.0000.00816.74
8.0.50.0000.00716.86
8.0.30.0150.00516.92
8.0.20.0110.00817.40
8.0.10.0070.00016.92
8.0.00.0090.01216.71
7.4.330.0030.00315.02
7.4.320.0030.00316.43
7.4.300.0000.00716.46
7.4.290.0000.00716.52
7.4.280.0060.00316.54
7.4.270.0040.00416.38
7.4.260.0070.00016.53
7.4.250.0040.00416.39
7.4.240.0020.00516.50
7.4.230.0000.00716.37
7.4.220.0140.00416.53
7.4.210.0120.00316.49
7.4.200.0000.00716.61
7.4.160.0090.00616.21
7.4.150.0090.01017.40
7.4.140.0110.00817.86
7.4.130.0090.01316.55
7.4.120.0090.00916.67
7.4.110.0110.00716.46
7.4.100.0100.00716.50
7.4.90.0100.00716.30
7.4.80.0130.00419.39
7.4.70.0140.00316.50
7.4.60.0170.00016.33
7.4.50.0050.00016.64
7.4.40.0100.01316.57
7.4.30.0040.01216.48
7.4.00.0040.01415.05
7.3.330.0000.00613.32
7.3.320.0020.00213.32
7.3.310.0070.00016.30
7.3.300.0070.00016.39
7.3.290.0090.00616.32
7.3.280.0110.00616.34
7.3.270.0110.00817.40
7.3.260.0150.00316.61
7.3.250.0130.00316.51
7.3.240.0190.00616.52
7.3.230.0110.00516.40
7.3.210.0080.00816.15
7.3.200.0080.00819.39
7.3.190.0060.01416.58
7.3.180.0070.01016.47
7.3.170.0100.00816.40
7.3.160.0110.00716.50
7.3.10.0070.00716.86
7.3.00.0000.01416.46
7.2.330.0140.00916.81
7.2.320.0090.00916.67
7.2.310.0030.01316.62
7.2.300.0100.00716.43
7.2.290.0060.01216.69
7.2.130.0080.00816.78
7.2.120.0030.01016.75
7.2.110.0000.01316.92
7.2.100.0000.01816.93
7.2.90.0040.01216.85
7.2.80.0030.00917.07
7.2.70.0060.00617.09
7.2.60.0050.00816.91
7.2.50.0060.00316.80
7.2.40.0030.00716.79
7.2.30.0000.01116.69
7.2.20.0090.00616.90
7.2.10.0030.01016.92
7.2.00.0090.00517.99
7.1.250.0060.00615.69
7.1.200.0090.00615.86
7.1.100.0030.01017.91
7.1.70.0000.00717.13
7.1.60.0060.01819.32
7.1.50.0130.01016.51
7.1.00.0070.07322.48
7.0.200.0000.01016.65
7.0.140.0070.07321.96
7.0.60.0030.04319.88
7.0.50.0070.04017.90
7.0.40.0130.05720.06
7.0.30.0270.06720.15
7.0.20.0270.05020.09
7.0.10.0100.08720.24
7.0.00.0100.03720.09
5.6.280.0000.07721.00
5.6.210.0070.04720.67
5.6.200.0070.05318.18
5.6.190.0070.05320.60
5.6.180.3170.04020.67
5.6.170.0370.07020.53
5.6.160.0030.05020.44
5.6.150.0030.08318.15
5.6.140.0170.07718.19
5.6.130.0070.03718.18
5.6.120.0170.07721.00
5.6.110.0030.04320.98
5.6.100.0030.07020.98
5.6.90.0170.07021.00
5.6.80.0070.03320.48
5.6.70.4570.03720.46
5.5.350.0030.07020.43
5.5.340.0130.07318.04
5.5.330.0030.05720.44
5.5.320.0270.05020.47
5.5.310.0130.08320.27
5.5.300.0000.08318.08
5.5.290.0030.07318.04
5.5.280.0100.08320.78
5.5.270.0130.06320.87
5.5.260.0100.03720.88
5.5.250.0130.08020.59
5.5.240.0200.06720.37
5.4.450.0900.05319.50
5.4.440.0830.06319.47
5.4.430.0100.05719.46
5.4.420.0870.05319.57
5.4.410.1030.05319.50
5.4.400.0800.05018.87
5.4.390.0500.06019.30
5.4.380.0130.05318.87
5.4.370.0900.06719.30
5.4.360.0670.06719.12
5.4.350.0900.06019.01
5.4.340.0080.03212.02
5.4.320.0060.04312.51
5.4.310.0070.03712.51
5.4.300.0090.04012.51
5.4.290.0070.03512.51
5.4.280.0130.03412.40
5.4.270.0040.03912.40
5.4.260.0080.04012.40
5.4.250.0070.05212.40
5.4.240.0070.03812.40
5.4.230.0070.03812.39
5.4.220.0100.04112.40
5.4.210.0050.03612.39
5.4.200.0080.04212.39
5.4.190.0110.04012.39
5.4.180.0080.04112.39
5.4.170.0050.03612.40
5.4.160.0070.04012.40
5.4.150.0060.04212.39
5.4.140.0060.03612.07
5.4.130.0060.03712.06
5.4.120.0030.03812.02
5.4.110.0060.03412.01
5.4.100.0040.03612.02
5.4.90.0070.03512.02
5.4.80.0070.03512.02
5.4.70.0060.03312.02
5.4.60.0060.03512.02
5.4.50.0040.03712.01
5.4.40.0090.03212.00
5.4.30.0070.03512.00
5.4.20.0050.03712.00
5.4.10.0040.03711.99
5.4.00.0060.03911.48
5.3.290.0060.04812.80
5.3.280.0070.03712.71
5.3.270.0090.03812.72
5.3.260.0050.04012.72
5.3.250.0030.04012.72
5.3.240.0050.03812.72
5.3.230.0060.03812.71
5.3.220.0040.03812.68
5.3.210.0060.03812.68
5.3.200.0090.03412.68
5.3.190.0070.03512.67
5.3.180.0060.03812.68
5.3.170.0110.04612.67
5.3.160.0060.03812.67
5.3.150.0090.03412.67
5.3.140.0070.03512.66
5.3.130.0060.03812.66
5.3.120.0040.04412.66
5.3.110.0060.04512.66
5.3.100.0100.04212.12
5.3.90.0030.03812.10
5.3.80.0070.03412.09
5.3.70.0070.03612.09
5.3.60.0050.03612.07
5.3.50.0060.03612.03
5.3.40.0050.03612.02
5.3.30.0050.03511.98
5.3.20.0050.03511.76
5.3.10.0060.03411.72
5.3.00.0050.03611.71
5.2.170.0010.0339.22
5.2.160.0020.0319.22
5.2.150.0030.0319.22
5.2.140.0040.0309.22
5.2.130.0030.0309.17
5.2.120.0010.0319.18
5.2.110.0020.0319.18
5.2.100.0080.0299.18
5.2.90.0060.0369.18
5.2.80.0040.0299.18
5.2.70.0070.0319.18
5.2.60.0050.0289.13
5.2.50.0070.0349.10
5.2.40.0050.0279.07
5.2.30.0020.0319.05
5.2.20.0060.0299.04
5.2.10.0030.0308.95
5.2.00.0100.0298.81
5.1.60.0030.0258.09
5.1.50.0060.0248.09
5.1.40.0070.0238.07
5.1.30.0070.0338.42
5.1.20.0070.0238.44
5.1.10.0030.0278.16
5.1.00.0040.0268.17
5.0.50.0050.0196.64
5.0.40.0040.0186.50
5.0.30.0020.0336.32
5.0.20.0050.0186.28
5.0.10.0040.0206.26
5.0.00.0030.0356.25
4.4.90.0050.0214.78
4.4.80.0030.0154.75
4.4.70.0050.0144.75
4.4.60.0040.0134.76
4.4.50.0010.0164.77
4.4.40.0020.0274.71
4.4.30.0050.0134.76
4.4.20.0020.0164.85
4.4.10.0020.0164.85
4.4.00.0030.0234.76
4.3.110.0030.0224.67
4.3.100.0030.0174.66
4.3.90.0040.0144.63
4.3.80.0030.0254.58
4.3.70.0050.0124.63
4.3.60.0010.0184.63
4.3.50.0020.0174.63
4.3.40.0010.0264.54
4.3.30.0020.0173.30
4.3.20.0040.0173.28
4.3.10.0030.0203.24
4.3.00.0130.0176.77

preferences:
45.12 ms | 401 KiB | 5 Q