3v4l.org

run code in 300+ PHP versions simultaneously
<!doctype html> <html> <head> <title>question2</title> <head> <body> if(isset($_POST['num1'])){ $num1 = $_POST['num1']; $num2 = $_POST['num2']; $result = $num1 + $num2; } ?> <form action="test.htm" method="post" name="myform" align="center"> Enter number 1:<input type="text" name="num1" /> <br> Enter number 2:<input type="text" name="num2" /> <br> <input type="submit" name="result" /> </form> <hr> <table border='1' align='center'> <td>number 1</td><td>calculate</td><td>number 2</td><td>result</td> <tr> <td> <? echo $num1; ?> </td> <td>+</td> <td> <? echo $num2; ?> </td> <td> <? echo $result; ?> </td> </table> </body> </html>

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.0030.01018.31
8.3.50.0110.00822.75
8.3.40.0110.00418.47
8.3.30.0140.00718.93
8.3.20.0040.00420.29
8.3.10.0030.00620.45
8.3.00.0040.00419.25
8.2.180.0150.00316.63
8.2.170.0090.00922.96
8.2.160.0060.00920.27
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0050.00226.16
8.2.120.0040.00421.04
8.2.110.0060.00320.58
8.2.100.0000.01117.97
8.2.90.0070.00019.09
8.2.80.0080.00017.97
8.2.70.0050.00517.38
8.2.60.0060.00317.93
8.2.50.0060.00318.07
8.2.40.0080.00017.92
8.2.30.0040.00419.34
8.2.20.0040.00417.44
8.2.10.0070.00017.80
8.2.00.0020.00517.69
8.1.280.0100.00725.92
8.1.270.0080.00022.14
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0050.00323.82
8.1.230.0040.00719.08
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0080.00017.10
8.1.180.0030.00518.10
8.1.170.0110.00018.58
8.1.160.0060.00321.94
8.1.150.0040.00418.66
8.1.140.0050.00217.22
8.1.130.0040.00417.75
8.1.120.0000.00717.36
8.1.110.0000.00917.34
8.1.100.0030.00317.20
8.1.90.0000.00717.33
8.1.80.0030.00317.32
8.1.70.0000.00717.27
8.1.60.0040.00417.38
8.1.50.0040.00417.29
8.1.40.0070.00017.25
8.1.30.0000.00817.54
8.1.20.0040.00417.50
8.1.10.0000.00717.41
8.1.00.0020.00517.29
8.0.300.0040.00418.77
8.0.290.0030.00616.63
8.0.280.0000.00718.31
8.0.270.0000.00617.15
8.0.260.0000.00717.08
8.0.250.0000.00716.79
8.0.240.0000.00816.86
8.0.230.0070.00016.71
8.0.220.0070.00016.66
8.0.210.0070.00016.68
8.0.200.0000.00616.84
8.0.190.0040.00416.83
8.0.180.0040.00416.72
8.0.170.0030.00616.77
8.0.160.0070.00016.72
8.0.150.0040.00416.67
8.0.140.0060.00316.79
8.0.130.0000.00513.28
8.0.120.0040.00416.76
8.0.110.0040.00416.80
8.0.100.0000.00816.68
8.0.90.0030.00716.66
8.0.80.0120.00916.75
8.0.70.0030.00516.65
8.0.60.0040.00416.68
8.0.50.0040.00416.86
8.0.30.0090.01417.12
8.0.20.0080.01117.40
8.0.10.0030.00516.84
8.0.00.0110.00616.69
7.4.330.0000.00515.00
7.4.320.0070.00016.48
7.4.300.0000.00616.38
7.4.290.0000.00616.45
7.4.280.0070.00316.44
7.4.270.0070.00016.39
7.4.260.0080.00016.38
7.4.250.0040.00416.42
7.4.240.0020.00516.41
7.4.230.0030.00316.27
7.4.220.0140.00716.39
7.4.210.0030.01016.55
7.4.200.0000.00816.35
7.4.160.0070.01016.12
7.4.150.0190.00617.40
7.4.140.0080.01017.86
7.4.130.0110.00616.54
7.4.120.0100.00716.46
7.4.110.0000.01516.42
7.4.100.0130.01016.36
7.4.90.0140.00316.45
7.4.80.0110.00619.39
7.4.70.0130.00316.25
7.4.60.0060.01016.39
7.4.50.0000.00916.31
7.4.40.0080.00816.30
7.4.30.0150.00016.26
7.4.00.0070.00715.16
7.3.330.0000.00613.14
7.3.320.0050.00013.11
7.3.310.0000.00815.95
7.3.300.0040.00416.13
7.3.290.0090.00616.18
7.3.280.0090.00816.16
7.3.270.0160.00317.40
7.3.260.0060.01216.20
7.3.250.0160.01016.30
7.3.240.0080.00816.33
7.3.230.0140.00416.39
7.3.210.0060.01316.34
7.3.200.0130.00319.39
7.3.190.0090.00916.22
7.3.180.0090.00616.29
7.3.170.0120.01016.44
7.3.160.0090.00916.33
7.2.330.0070.01416.29
7.2.320.0140.00416.34
7.2.310.0190.00016.57
7.2.300.0070.01016.43
7.2.290.0120.01016.28
7.2.00.0130.00519.20
7.1.100.0030.01017.84
7.1.70.0000.00716.89
7.1.60.0070.01719.61
7.1.50.0000.01916.61
7.1.00.0070.07322.40
7.0.200.0060.00316.67
7.0.140.0130.06322.19
7.0.60.0070.04319.93
7.0.50.0170.06317.90
7.0.40.0070.05020.08
7.0.30.0230.07720.18
7.0.20.0230.07020.00
7.0.10.0030.06319.99
7.0.00.0070.08320.13
5.6.280.0030.07320.89
5.6.210.0030.08720.47
5.6.200.0100.04718.23
5.6.190.0070.06020.77
5.6.180.0270.07020.35
5.6.170.0470.05720.46
5.6.160.0070.04720.40
5.6.150.0100.03318.17
5.6.140.0070.07018.11
5.6.130.0070.07718.16
5.6.120.0070.08321.11
5.6.110.0100.06720.98
5.6.100.0100.07020.95
5.6.90.0000.04321.11
5.6.80.0030.04020.41
5.5.350.0200.05720.42
5.5.340.0100.08018.02
5.5.330.0170.07020.37
5.5.320.0000.04320.34
5.5.310.0330.06320.29
5.5.300.0030.06017.89
5.5.290.0000.06317.90
5.5.280.0070.06020.64
5.5.270.0130.06720.75
5.5.260.0070.07720.83
5.5.250.0100.07320.68
5.5.240.0030.05720.14
5.4.450.0130.05719.63
5.4.440.0230.04719.13
5.4.430.0770.06019.51
5.4.420.0630.05719.46
5.4.410.0670.04719.48
5.4.400.0830.05319.26
5.4.390.0700.06319.22
5.4.380.0300.07018.67
5.4.370.0400.04718.63
5.4.360.0270.06318.72
5.4.350.0230.08318.63
5.4.340.0370.04718.45
5.4.320.0070.03612.45
5.4.310.0060.03812.45
5.4.300.0060.03712.45
5.4.290.0070.03912.45
5.4.280.0060.03512.34
5.4.270.0090.03812.34
5.4.260.0060.04412.34
5.4.250.0090.04912.35
5.4.240.0080.04312.35
5.4.230.0060.04512.34
5.4.220.0060.04812.34
5.4.210.0070.04612.34
5.4.200.0080.04712.34
5.4.190.0080.03912.34
5.4.180.0060.04112.33
5.4.170.0070.03812.35
5.4.160.0080.04012.34
5.4.150.0050.04312.34
5.4.140.0090.04312.02
5.4.130.0080.03912.01
5.4.120.0070.04711.96
5.4.110.0090.04411.96
5.4.100.0030.03711.96
5.4.90.0050.03811.96
5.4.80.0100.04211.96
5.4.70.0100.04511.96
5.4.60.0100.05111.96
5.4.50.0120.04511.96
5.4.40.0070.03611.95
5.4.30.0040.04011.95
5.4.20.0110.04211.95
5.4.10.0080.04911.95
5.4.00.0080.04911.43
5.3.290.0080.05512.80
5.3.280.0100.04912.71
5.3.270.0120.05012.72
5.3.260.0090.05512.72
5.3.250.0150.04912.72
5.3.240.0110.04512.72
5.3.230.0040.04412.71
5.3.220.0090.03712.68
5.3.210.0080.04012.68
5.3.200.0060.04012.68
5.3.190.0100.03612.68
5.3.180.0080.03912.68
5.3.170.0090.04212.67
5.3.160.0080.03712.67
5.3.150.0090.04512.67
5.3.140.0110.03412.66
5.3.130.0070.04012.66
5.3.120.0120.03412.66
5.3.110.0070.04512.65
5.3.100.0080.04112.12
5.3.90.0080.03612.09
5.3.80.0090.04712.07
5.3.70.0070.05012.08
5.3.60.0070.05012.06
5.3.50.0090.04312.00
5.3.40.0080.04012.00
5.3.30.0080.04411.94
5.3.20.0050.03811.72
5.3.10.0020.04111.69
5.3.00.0060.03611.67
5.2.170.0050.0329.18
5.2.160.0060.0309.18
5.2.150.0060.0329.18
5.2.140.0040.0319.18
5.2.130.0070.0299.14
5.2.120.0060.0399.14
5.2.110.0070.0309.14
5.2.100.0040.0319.14
5.2.90.0080.0389.14
5.2.80.0040.0359.14
5.2.70.0050.0329.13
5.2.60.0030.0329.09
5.2.50.0090.0399.06
5.2.40.0110.0309.03
5.2.30.0040.0309.00
5.2.20.0050.0279.00
5.2.10.0020.0298.91
5.2.00.0040.0298.78
5.1.60.0070.0218.06
5.1.50.0040.0268.05
5.1.40.0020.0298.04
5.1.30.0040.0268.39
5.1.20.0030.0288.41
5.1.10.0050.0278.13
5.1.00.0040.0298.14
5.0.50.0060.0196.61
5.0.40.0010.0246.48
5.0.30.0020.0446.28
5.0.20.0040.0266.25
5.0.10.0080.0206.24
5.0.00.0040.0316.23
4.4.90.0030.0194.78
4.4.80.0050.0164.75
4.4.70.0050.0154.75
4.4.60.0020.0174.76
4.4.50.0040.0154.77
4.4.40.0010.0284.71
4.4.30.0040.0144.76
4.4.20.0030.0154.85
4.4.10.0040.0144.85
4.4.00.0030.0304.76
4.3.110.0030.0154.67
4.3.100.0020.0164.67
4.3.90.0040.0154.63
4.3.80.0050.0244.58
4.3.70.0020.0164.63
4.3.60.0050.0154.62
4.3.50.0020.0174.63
4.3.40.0020.0274.54
4.3.30.0020.0173.28
4.3.20.0040.0173.25
4.3.10.0020.0183.22
4.3.00.0030.0207.91

preferences:
85.15 ms | 400 KiB | 5 Q