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.0130.00718.18
8.3.50.0090.00922.85
8.3.40.0150.00318.56
8.3.30.0140.00019.00
8.3.20.0050.00220.29
8.3.10.0030.00620.28
8.3.00.0000.00919.13
8.2.180.0130.00316.50
8.2.170.0100.00722.96
8.2.160.0090.00620.57
8.2.150.0070.00024.18
8.2.140.0140.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00020.90
8.2.110.0100.00020.52
8.2.100.0040.00818.16
8.2.90.0000.00719.05
8.2.80.0080.00017.97
8.2.70.0050.00317.50
8.2.60.0000.00917.80
8.2.50.0080.00018.07
8.2.40.0000.00918.14
8.2.30.0000.00719.48
8.2.20.0030.00517.53
8.2.10.0040.00417.96
8.2.00.0000.00717.55
8.1.280.0140.00025.92
8.1.270.0080.00022.01
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.79
8.1.230.0070.00318.97
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0030.00717.00
8.1.190.0000.00816.97
8.1.180.0060.00318.10
8.1.170.0120.00618.05
8.1.160.0040.00421.95
8.1.150.0040.00418.60
8.1.140.0030.00517.22
8.1.130.0000.00717.71
8.1.120.0030.00517.29
8.1.110.0000.00817.23
8.1.100.0000.00717.38
8.1.90.0030.00317.34
8.1.80.0000.00717.25
8.1.70.0040.00417.30
8.1.60.0070.00017.42
8.1.50.0040.00417.36
8.1.40.0070.00017.38
8.1.30.0030.00617.47
8.1.20.0080.00017.41
8.1.10.0050.00317.33
8.1.00.0050.00217.42
8.0.300.0000.00718.77
8.0.290.0040.00416.63
8.0.280.0000.00818.29
8.0.270.0050.00217.18
8.0.260.0000.00817.19
8.0.250.0070.00016.82
8.0.240.0000.00916.82
8.0.230.0030.00316.79
8.0.220.0050.00216.75
8.0.210.0000.00816.66
8.0.200.0030.00316.83
8.0.190.0000.00716.80
8.0.180.0000.00716.65
8.0.170.0040.00416.84
8.0.160.0040.00416.70
8.0.150.0070.00016.77
8.0.140.0000.00816.67
8.0.130.0060.00013.31
8.0.120.0030.00616.76
8.0.110.0000.00816.61
8.0.100.0050.00316.73
8.0.90.0040.00416.73
8.0.80.0070.01416.77
8.0.70.0050.00316.63
8.0.60.0040.00416.82
8.0.50.0000.00716.71
8.0.30.0090.00917.06
8.0.20.0130.00617.40
8.0.10.0030.00616.72
8.0.00.0070.01016.64
7.4.330.0000.00515.00
7.4.320.0000.00716.36
7.4.300.0000.00616.29
7.4.290.0040.00416.48
7.4.280.0030.00616.48
7.4.270.0030.00316.39
7.4.260.0030.00316.27
7.4.250.0000.00816.31
7.4.240.0050.00216.46
7.4.230.0070.00016.35
7.4.220.0130.00616.29
7.4.210.0030.01016.48
7.4.200.0030.00316.54
7.4.160.0140.00516.29
7.4.150.0100.01017.40
7.4.140.0120.00417.86
7.4.130.0160.00216.46
7.4.120.0050.01516.46
7.4.110.0160.00616.48
7.4.100.0150.00916.60
7.4.90.0130.01016.18
7.4.80.0130.00319.39
7.4.70.0070.01016.28
7.4.60.0100.00616.44
7.4.50.0040.00016.31
7.4.40.0060.00916.56
7.4.30.0080.00816.45
7.4.00.0070.00914.68
7.3.330.0000.00513.00
7.3.320.0000.00613.06
7.3.310.0030.00316.18
7.3.300.0000.00716.21
7.3.290.0070.00716.18
7.3.280.0090.00916.11
7.3.270.0130.00417.40
7.3.260.0040.01416.51
7.3.250.0150.00816.31
7.3.240.0070.01016.41
7.3.230.0060.01216.39
7.3.210.0100.00716.17
7.3.200.0120.00416.44
7.3.190.0150.00616.46
7.3.180.0060.01016.19
7.3.170.0170.00016.37
7.3.160.0100.00716.31
7.3.120.0120.00414.83
7.3.110.0130.00614.82
7.3.100.0110.00414.86
7.3.90.0000.01414.61
7.3.80.0110.00714.80
7.3.70.0060.00614.82
7.3.60.0000.00814.25
7.3.50.0080.00614.81
7.3.40.0040.00714.75
7.3.30.0000.01814.79
7.3.20.0030.01016.47
7.3.10.0040.01116.54
7.3.00.0000.00916.28
7.2.330.0070.01016.72
7.2.320.0130.00316.30
7.2.310.0070.01316.25
7.2.300.0130.00416.56
7.2.290.0100.01016.57
7.2.250.0070.01414.53
7.2.240.0060.01014.75
7.2.230.0070.01314.87
7.2.220.0030.00714.97
7.2.210.0060.00915.01
7.2.200.0090.00614.85
7.2.190.0040.01214.71
7.2.180.0030.01014.87
7.2.170.0080.00314.87
7.2.00.0110.01119.11
7.1.330.0070.00715.73
7.1.320.0080.00415.57
7.1.310.0070.00715.99
7.1.300.0060.00915.57
7.1.290.0030.01015.79
7.1.280.0030.01015.56
7.1.270.0000.01115.85
7.1.260.0030.00715.64
7.1.100.0030.00918.04
7.1.70.0030.00517.04
7.1.60.0030.01919.61
7.1.50.0130.01016.98
7.1.00.0070.07322.44
7.0.200.0050.00516.73
7.0.140.0030.07322.16
7.0.60.0070.08020.02
7.0.50.0030.04017.81
7.0.40.0070.04320.22
7.0.30.0330.05720.14
7.0.20.0230.05020.09
7.0.10.0100.04020.15
7.0.00.0100.04020.16
5.6.280.0030.07320.81
5.6.210.0130.08020.61
5.6.200.0100.06018.15
5.6.190.0130.08020.57
5.6.180.0230.07320.49
5.6.170.0270.04720.52
5.6.160.0070.07020.70
5.6.150.0070.08318.15
5.6.140.0030.04318.15
5.6.130.0130.06718.16
5.6.120.0100.05721.03
5.6.110.0200.07321.04
5.6.100.0030.08720.97
5.6.90.0130.04320.99
5.6.80.0070.03720.35
5.6.70.3870.04020.35
5.5.350.0070.08720.43
5.5.340.0100.07017.96
5.5.330.0000.07020.21
5.5.320.0300.05320.21
5.5.310.0330.07720.29
5.5.300.0130.06718.01
5.5.290.0070.08018.02
5.5.280.0170.06020.87
5.5.270.0100.05020.64
5.5.260.0130.06320.86
5.5.250.0170.07320.68
5.5.240.0230.07020.01
5.4.450.0100.05319.42
5.4.440.0070.04019.41
5.4.430.0230.03019.24
5.4.420.0270.05019.45
5.4.410.0430.03019.00
5.4.400.0270.04019.06
5.4.390.0330.04318.93
5.4.380.0170.06718.62
5.4.370.0300.05318.71
5.4.360.0300.05718.48
5.4.350.0270.06718.71
5.4.340.0330.04718.51
5.4.320.0090.03812.45
5.4.310.0070.03812.45
5.4.300.0070.03612.45
5.4.290.0090.03612.45
5.4.280.0100.03512.35
5.4.270.0090.04712.34
5.4.260.0080.04512.35
5.4.250.0030.04112.34
5.4.240.0050.04012.34
5.4.230.0050.04212.34
5.4.220.0080.04012.34
5.4.210.0090.03512.34
5.4.200.0060.04012.34
5.4.190.0060.03712.33
5.4.180.0050.03812.33
5.4.170.0060.03612.34
5.4.160.0060.03712.34
5.4.150.0050.04012.34
5.4.140.0090.03512.02
5.4.130.0040.03712.01
5.4.120.0060.03511.97
5.4.110.0110.03911.96
5.4.100.0090.03211.96
5.4.90.0070.03611.96
5.4.80.0050.03711.96
5.4.70.0110.04411.96
5.4.60.0090.04411.96
5.4.50.0070.04211.96
5.4.40.0100.04511.95
5.4.30.0070.04111.95
5.4.20.0060.03511.94
5.4.10.0080.03211.95
5.4.00.0040.03811.44
5.3.290.0060.03912.80
5.3.280.0050.03912.71
5.3.270.0080.04012.72
5.3.260.0030.04212.72
5.3.250.0060.04112.72
5.3.240.0070.04912.71
5.3.230.0130.06212.71
5.3.220.0050.04012.68
5.3.210.0070.05612.68
5.3.200.0080.04912.68
5.3.190.0080.03512.68
5.3.180.0050.03712.68
5.3.170.0040.04012.67
5.3.160.0040.03812.68
5.3.150.0030.04012.67
5.3.140.0100.03312.66
5.3.130.0090.04812.66
5.3.120.0080.03912.66
5.3.110.0060.04112.66
5.3.100.0050.04112.11
5.3.90.0070.03412.09
5.3.80.0050.03712.07
5.3.70.0040.03912.07
5.3.60.0060.04012.07
5.3.50.0080.04412.00
5.3.40.0040.03812.00
5.3.30.0070.03411.94
5.3.20.0040.04011.72
5.3.10.0070.04211.69
5.3.00.0070.04011.67
5.2.170.0080.0299.18
5.2.160.0040.0319.18
5.2.150.0020.0389.18
5.2.140.0050.0349.17
5.2.130.0070.0299.14
5.2.120.0070.0289.14
5.2.110.0060.0369.14
5.2.100.0060.0289.13
5.2.90.0040.0309.13
5.2.80.0050.0309.13
5.2.70.0020.0339.13
5.2.60.0030.0349.09
5.2.50.0060.0329.06
5.2.40.0010.0339.03
5.2.30.0040.0319.01
5.2.20.0040.0299.00
5.2.10.0020.0318.92
5.2.00.0050.0318.77
5.1.60.0060.0268.06
5.1.50.0080.0268.06
5.1.40.0070.0318.04
5.1.30.0050.0278.39
5.1.20.0090.0258.41
5.1.10.0060.0258.14
5.1.00.0030.0288.13
5.0.50.0050.0196.61
5.0.40.0050.0196.48
5.0.30.0030.0336.28
5.0.20.0030.0226.26
5.0.10.0010.0236.24
5.0.00.0030.0326.23
4.4.90.0020.0204.78
4.4.80.0040.0154.75
4.4.70.0030.0164.75
4.4.60.0010.0184.76
4.4.50.0020.0164.77
4.4.40.0030.0254.71
4.4.30.0030.0154.76
4.4.20.0030.0154.85
4.4.10.0020.0174.85
4.4.00.0020.0264.76
4.3.110.0020.0164.66
4.3.100.0040.0204.66
4.3.90.0050.0194.63
4.3.80.0040.0294.59
4.3.70.0060.0144.63
4.3.60.0020.0174.63
4.3.50.0020.0224.63
4.3.40.0030.0274.54
4.3.30.0040.0153.28
4.3.20.0020.0163.26
4.3.10.0000.0183.22
4.3.00.0100.01718.16

preferences:
43.48 ms | 404 KiB | 6 Q