3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myvar = 1; $my_other_var = 4; $third_var = 10; $dc_tx = 22; // Good practice to initialise variables. $result = FALSE; // If required, this comment will explain what we're about to do. if (isset($myvar)) { // This comment would explain why we are adding 6 to myvar. $result = $myvar + 6; } elseif (!empty($my_other_var)) { // This comment explains why we got here and why we're about // to add these two variables together. $result = $myvar + $third_var; } else { // Explain why we're using this var as the result. $result = $dc_tx; }

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.40.0110.00418.72
8.3.30.0090.00619.09
8.3.20.0000.00820.29
8.3.10.0040.00420.36
8.3.00.0050.00319.13
8.2.170.0110.00422.96
8.2.160.0090.01220.35
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0000.00722.06
8.2.110.0060.00322.23
8.2.100.0090.00320.38
8.2.90.0080.00019.09
8.2.80.0000.00817.97
8.2.70.0050.00317.50
8.2.60.0070.00017.90
8.2.50.0030.00618.07
8.2.40.0070.00018.22
8.2.30.0000.00818.00
8.2.20.0040.00417.57
8.2.10.0000.00718.11
8.2.00.0000.00817.76
8.1.270.0090.00022.02
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00023.69
8.1.230.0070.00319.19
8.1.220.0080.00017.74
8.1.210.0090.00018.77
8.1.200.0030.00617.23
8.1.190.0000.00817.22
8.1.180.0030.00618.10
8.1.170.0050.00318.66
8.1.160.0050.00221.87
8.1.150.0040.00418.89
8.1.140.0040.00417.43
8.1.130.0040.00417.75
8.1.120.0030.00317.36
8.1.110.0000.00717.39
8.1.100.0040.00417.43
8.1.90.0040.00417.40
8.1.80.0000.00717.39
8.1.70.0070.00017.27
8.1.60.0040.00417.52
8.1.50.0040.00417.34
8.1.40.0000.00917.45
8.1.30.0000.00817.57
8.1.20.0060.00317.63
8.1.10.0000.00717.33
8.1.00.0050.00217.29
8.0.300.0000.00918.77
8.0.290.0000.00716.63
8.0.280.0070.00018.38
8.0.270.0000.00717.25
8.0.260.0030.00317.13
8.0.250.0040.00416.93
8.0.240.0030.00316.89
8.0.230.0050.00216.78
8.0.220.0040.00416.70
8.0.210.0000.00716.80
8.0.200.0000.00816.80
8.0.190.0000.00816.93
8.0.180.0030.00316.74
8.0.170.0060.00316.87
8.0.160.0030.00516.85
8.0.150.0000.00716.83
8.0.140.0000.00716.82
8.0.130.0000.00513.25
8.0.120.0000.00716.75
8.0.110.0070.00016.82
8.0.100.0000.00816.68
8.0.90.0050.00316.75
8.0.80.0110.01116.77
8.0.70.0050.00216.66
8.0.60.0040.00416.83
8.0.50.0000.00716.67
8.0.30.0150.00316.77
8.0.20.0110.00717.40
8.0.10.0000.00717.01
8.0.00.0070.01016.75
7.4.330.0000.00515.03
7.4.320.0030.00316.46
7.4.300.0030.00316.34
7.4.290.0030.00316.45
7.4.280.0000.00816.43
7.4.270.0060.00016.53
7.4.260.0070.00416.42
7.4.250.0040.00416.38
7.4.240.0000.00816.47
7.4.230.0000.00716.34
7.4.220.0090.01616.57
7.4.210.0060.01216.38
7.4.200.0000.00716.64
7.4.160.0080.01116.53
7.4.150.0100.01317.40
7.4.140.0090.01317.86
7.4.130.0090.00716.40
7.4.120.0110.00916.42
7.4.110.0110.00416.38
7.4.100.0070.01016.38
7.4.90.0030.01616.41
7.4.80.0040.01919.37
7.4.70.0070.01116.21
7.4.60.0130.00316.48
7.4.50.0000.00516.61
7.4.40.0140.00316.61
7.4.30.0160.00316.42
7.4.00.0110.00414.84
7.3.330.0000.00512.95
7.3.320.0000.00613.13
7.3.310.0070.00016.20
7.3.300.0000.00716.18
7.3.290.0100.00516.23
7.3.280.0110.00516.23
7.3.270.0090.01217.40
7.3.260.0090.00916.43
7.3.250.0130.01016.27
7.3.240.0090.00816.19
7.3.230.0100.00716.39
7.3.210.0060.01716.49
7.3.200.0100.01119.39
7.3.190.0090.01216.21
7.3.180.0030.01316.52
7.3.170.0030.02016.27
7.3.160.0070.01016.41
7.2.330.0030.01416.45
7.2.320.0130.00316.52
7.2.310.0090.01416.66
7.2.300.0070.01416.65
7.2.290.0120.00616.68
7.1.70.0000.00717.03
7.1.60.0120.01219.32
7.1.50.0030.01716.69
7.1.00.0170.06722.45
7.0.200.0000.00916.87
7.0.140.0000.07721.95
7.0.60.0130.06019.93
7.0.50.0070.07717.89
7.0.40.0100.07720.07
7.0.30.0470.06320.09
7.0.20.0300.07320.33
7.0.10.0070.05320.18
7.0.00.0000.05320.03
5.6.280.0070.07021.11
5.6.210.0070.08020.51
5.6.200.0070.03718.12
5.6.190.0030.04320.45
5.6.180.0170.04320.63
5.6.170.0300.05020.42
5.6.160.0100.07320.39
5.6.150.0030.05318.17
5.6.140.0100.08018.11
5.6.130.0070.08018.14
5.6.120.0030.04320.73
5.6.110.0070.08021.12
5.6.100.0130.05020.88
5.6.90.0000.06721.02
5.6.80.0100.07320.50
5.5.350.0170.08720.46
5.5.340.0070.07317.95
5.5.330.0000.06720.12
5.5.320.0370.08020.41
5.5.310.0230.06020.28
5.5.300.0070.05317.96
5.5.290.0100.03317.90
5.5.280.0070.08020.67
5.5.270.0070.08720.84
5.5.260.0130.03720.73
5.5.250.0000.04320.68
5.5.240.0170.07020.27
5.4.450.0870.04019.43
5.4.440.0970.05719.13
5.4.430.0970.05019.51
5.4.420.0670.00019.63
5.4.410.0630.00019.29
5.4.400.0670.00019.02
5.4.390.0670.00019.05
5.4.380.0670.00019.03
5.4.370.0630.00019.16
5.4.360.0670.00019.18
5.4.350.0670.00019.13
5.4.340.0670.00018.95
5.4.320.0040.03912.45
5.4.310.0070.03712.45
5.4.300.0090.03712.45
5.4.290.0060.04212.45
5.4.280.0090.04112.34
5.4.270.0070.03812.34
5.4.260.0060.03612.35
5.4.250.0060.04112.34
5.4.240.0070.03712.35
5.4.230.0080.03912.34
5.4.220.0070.03612.34
5.4.210.0070.03612.34
5.4.200.0070.04212.34
5.4.190.0110.03712.34
5.4.180.0060.03812.33
5.4.170.0110.03712.34
5.4.160.0100.04212.34
5.4.150.0100.03712.34
5.4.140.0100.04512.02
5.4.130.0070.04012.01
5.4.120.0080.03711.96
5.4.110.0070.04311.97
5.4.100.0070.03711.96
5.4.90.0060.04411.96
5.4.80.0070.03911.96
5.4.70.0070.04411.96
5.4.60.0060.03611.96
5.4.50.0090.04111.96
5.4.40.0080.03511.95
5.4.30.0110.03211.95
5.4.20.0040.03811.95
5.4.10.0110.04511.95
5.4.00.0030.03911.43
5.3.290.0070.04412.80
5.3.280.0060.04512.71
5.3.270.0030.04212.72
5.3.260.0090.04312.72
5.3.250.0060.04012.72
5.3.240.0090.03812.72
5.3.230.0040.04012.71
5.3.220.0060.04112.68
5.3.210.0080.03712.68
5.3.200.0060.03612.68
5.3.190.0070.04012.68
5.3.180.0090.03612.67
5.3.170.0050.04012.67
5.3.160.0090.03512.67
5.3.150.0050.04112.67
5.3.140.0110.03812.66
5.3.130.0080.04312.66
5.3.120.0060.04112.66
5.3.110.0060.04612.66
5.3.100.0090.03712.12
5.3.90.0050.04112.08
5.3.80.0060.04512.07
5.3.70.0060.04212.07
5.3.60.0040.04012.06
5.3.50.0080.03812.00
5.3.40.0070.04512.00
5.3.30.0040.03611.94
5.3.20.0030.04011.72
5.3.10.0070.03511.69
5.3.00.0070.03611.67
5.2.170.0060.0359.18
5.2.160.0020.0319.18
5.2.150.0040.0319.18
5.2.140.0040.0309.17
5.2.130.0060.0269.13
5.2.120.0050.0279.13
5.2.110.0040.0309.14
5.2.100.0080.0299.14
5.2.90.0040.0299.14
5.2.80.0040.0309.13
5.2.70.0070.0319.13
5.2.60.0060.0299.09
5.2.50.0080.0359.06
5.2.40.0070.0279.04
5.2.30.0010.0339.01
5.2.20.0050.0308.99
5.2.10.0040.0288.91
5.2.00.0050.0318.78
5.1.60.0030.0288.06
5.1.50.0020.0268.06
5.1.40.0060.0248.04
5.1.30.0050.0288.39
5.1.20.0060.0288.41
5.1.10.0050.0268.14
5.1.00.0010.0398.13
5.0.50.0050.0186.61
5.0.40.0030.0196.47
5.0.30.0010.0336.29
5.0.20.0030.0196.26
5.0.10.0010.0216.23
5.0.00.0020.0316.23
4.4.90.0030.0154.78
4.4.80.0010.0164.75
4.4.70.0020.0164.75
4.4.60.0060.0174.75
4.4.50.0020.0174.77
4.4.40.0020.0264.71
4.4.30.0020.0164.76
4.4.20.0040.0144.85
4.4.10.0030.0174.85
4.4.00.0030.0244.75
4.3.110.0040.0144.67
4.3.100.0040.0144.66
4.3.90.0000.0174.63
4.3.80.0010.0264.58
4.3.70.0020.0184.63
4.3.60.0020.0174.63
4.3.50.0040.0204.63
4.3.40.0010.0254.54
4.3.30.0020.0213.29
4.3.20.0030.0223.26
4.3.10.0020.0183.22
4.3.00.0300.03313.28

preferences:
39.33 ms | 400 KiB | 5 Q