3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myvar = FALSE; $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.60.0080.00618.43
8.3.50.0270.01221.88
8.3.40.0090.00518.67
8.3.30.0120.00318.87
8.3.20.0040.00420.16
8.3.10.0030.00720.53
8.3.00.0030.00519.25
8.2.180.0070.00716.63
8.2.170.0110.00322.96
8.2.160.0130.00720.58
8.2.150.0070.00024.18
8.2.140.0070.00024.66
8.2.130.0000.00726.16
8.2.120.0050.00222.23
8.2.110.0050.00520.44
8.2.100.0040.00717.86
8.2.90.0080.00019.17
8.2.80.0000.00817.97
8.2.70.0050.00317.50
8.2.60.0000.00817.80
8.2.50.0030.00618.07
8.2.40.0070.00018.16
8.2.30.0100.00018.00
8.2.20.0040.00417.62
8.2.10.0040.00418.06
8.2.00.0000.00917.62
8.1.280.0170.00325.92
8.1.270.0060.00322.19
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0080.00023.69
8.1.230.0110.00019.16
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0080.00017.22
8.1.180.0000.00718.10
8.1.170.0000.00818.43
8.1.160.0000.00722.05
8.1.150.0020.00518.86
8.1.140.0040.00417.30
8.1.130.0000.00717.81
8.1.120.0070.00017.27
8.1.110.0000.00717.28
8.1.100.0000.00717.29
8.1.90.0030.00317.35
8.1.80.0040.00417.38
8.1.70.0050.00317.37
8.1.60.0040.00417.48
8.1.50.0050.00317.37
8.1.40.0080.00017.48
8.1.30.0050.00317.54
8.1.20.0050.00317.52
8.1.10.0040.00417.48
8.1.00.0000.00717.39
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0030.00618.30
8.0.270.0030.00317.21
8.0.260.0030.00317.11
8.0.250.0000.00616.82
8.0.240.0000.00616.84
8.0.230.0070.00016.95
8.0.220.0000.00716.79
8.0.210.0030.00316.73
8.0.200.0040.00416.90
8.0.190.0000.00816.85
8.0.180.0000.00716.80
8.0.170.0000.00816.91
8.0.160.0000.00716.97
8.0.150.0040.00416.69
8.0.140.0030.00316.74
8.0.130.0000.00513.32
8.0.120.0000.00816.86
8.0.110.0040.00416.87
8.0.100.0000.00716.85
8.0.90.0040.00416.76
8.0.80.0000.01516.93
8.0.70.0040.00416.88
8.0.60.0040.00416.72
8.0.50.0000.00716.86
8.0.30.0130.00716.88
8.0.20.0070.01517.40
8.0.10.0030.00516.81
8.0.00.0110.00616.83
7.4.330.0000.00515.00
7.4.320.0000.00616.51
7.4.300.0060.00016.58
7.4.290.0030.00316.43
7.4.280.0060.00316.43
7.4.270.0000.00716.46
7.4.260.0030.00316.41
7.4.250.0040.00416.40
7.4.240.0030.00316.50
7.4.230.0000.00716.25
7.4.220.0150.00716.46
7.4.210.0130.00616.58
7.4.200.0000.00716.63
7.4.160.0100.01016.28
7.4.150.0130.01317.40
7.4.140.0050.01417.86
7.4.130.0130.00516.42
7.4.120.0110.00716.48
7.4.110.0100.00716.61
7.4.100.0080.00816.51
7.4.90.0080.00816.34
7.4.80.0130.00319.37
7.4.70.0090.01316.29
7.4.60.0110.00616.39
7.4.50.0000.00716.27
7.4.40.0090.01416.38
7.4.30.0100.01016.34
7.4.00.0070.01014.84
7.3.330.0050.00013.10
7.3.320.0060.00013.05
7.3.310.0040.00416.30
7.3.300.0070.00016.19
7.3.290.0070.00716.16
7.3.280.0080.01016.27
7.3.270.0030.01817.40
7.3.260.0080.01116.47
7.3.250.0050.01116.20
7.3.240.0060.01416.18
7.3.230.0100.00616.39
7.3.210.0100.01316.34
7.3.200.0060.01119.39
7.3.190.0160.00316.49
7.3.180.0090.00616.52
7.3.170.0160.00016.36
7.3.160.0090.00916.60
7.3.120.0030.01414.99
7.3.110.0130.00714.75
7.3.100.0080.00715.00
7.3.90.0030.01214.93
7.3.80.0070.01014.69
7.3.70.0090.00614.85
7.3.60.0040.00814.76
7.3.50.0100.00314.71
7.3.40.0000.01114.95
7.3.30.0030.01014.65
7.3.20.0000.01416.36
7.3.10.0060.00816.46
7.3.00.0050.00816.48
7.2.330.0100.00716.52
7.2.320.0100.01016.63
7.2.310.0080.01616.56
7.2.300.0060.01016.32
7.2.290.0090.00616.61
7.2.250.0100.00615.00
7.2.240.0120.00815.17
7.2.230.0120.00614.67
7.2.220.0070.00714.60
7.2.210.0070.01014.99
7.2.200.0080.00814.75
7.2.190.0040.00815.01
7.2.180.0100.00315.01
7.2.170.0110.00414.77
7.2.130.0030.01216.34
7.2.120.0050.00616.75
7.2.110.0060.00816.43
7.2.100.0060.00516.79
7.2.90.0090.00416.71
7.2.80.0080.00616.74
7.2.70.0050.00916.81
7.2.60.0060.00816.67
7.2.50.0090.00716.75
7.2.40.0080.00316.69
7.2.30.0090.00716.78
7.2.20.0080.00716.70
7.2.10.0110.00416.65
7.2.00.0050.00816.69
7.1.330.0110.00415.78
7.1.320.0100.00715.82
7.1.310.0000.01415.62
7.1.300.0030.01315.61
7.1.290.0070.00715.32
7.1.280.0090.00615.48
7.1.270.0090.00615.39
7.1.260.0060.00915.60
7.1.250.0020.00915.50
7.1.240.0060.00615.60
7.1.230.0130.00015.42
7.1.220.0060.00615.27
7.1.210.0000.01315.38
7.1.200.0060.00615.60
7.1.190.0040.01115.53
7.1.180.0060.00315.68
7.1.170.0100.00715.57
7.1.160.0030.01315.57
7.1.150.0090.00015.61
7.1.140.0030.01015.63
7.1.130.0030.01015.88
7.1.120.0000.00915.76
7.1.110.0070.00715.73
7.1.100.0070.00715.62
7.1.90.0090.00315.63
7.1.80.0000.01415.88
7.1.70.0030.00816.31
7.1.60.0040.00716.51
7.1.50.0050.01516.10
7.1.40.0060.00315.75
7.1.30.0060.00815.63
7.1.20.0100.00315.58
7.1.10.0110.00315.77
7.1.00.0050.04219.02
7.0.330.0060.00615.21
7.0.320.0060.00615.48
7.0.310.0030.01315.22
7.0.300.0070.00715.50
7.0.290.0040.00815.42
7.0.280.0100.00015.16
7.0.270.0130.00315.29
7.0.260.0070.00715.29
7.0.250.0120.00315.34
7.0.240.0030.01015.30
7.0.230.0060.00915.38
7.0.220.0030.01015.36
7.0.210.0040.01115.05
7.0.200.0040.00816.03
7.0.190.0070.00715.09
7.0.180.0040.00815.36
7.0.170.0000.01515.43
7.0.160.0000.00915.29
7.0.150.0050.00515.37
7.0.140.0090.03218.67
7.0.130.0030.01015.54
7.0.120.0070.00715.17
7.0.110.0070.00615.13
7.0.100.0130.04017.54
7.0.90.0050.05017.62
7.0.80.0030.05017.57
7.0.70.0100.02617.68
7.0.60.0040.04717.64
7.0.50.0030.04517.84
7.0.40.0070.02316.79
7.0.30.0060.02316.77
7.0.20.0070.04316.79
7.0.10.0050.04516.75
7.0.00.0030.04216.61
5.6.380.0040.01114.13
5.6.370.0090.00314.01
5.6.360.0030.01414.30
5.6.350.0120.00314.49
5.6.340.0030.00714.11
5.6.330.0110.00614.55
5.6.320.0030.00614.23
5.6.310.0070.00314.25
5.6.300.0000.01114.19
5.6.290.0040.00814.51
5.6.280.0050.04017.69
5.6.270.0030.00614.19
5.6.260.0090.00614.35
5.6.250.0050.04117.57
5.6.240.0120.04017.33
5.6.230.0080.04117.26
5.6.220.0090.02417.31
5.6.210.0060.02417.39
5.6.200.0080.04717.63
5.6.190.0050.04717.61
5.6.180.0110.02417.54
5.6.170.0030.04317.59
5.6.160.0060.02317.64
5.6.150.0140.02717.68
5.6.140.0050.04717.54
5.6.130.0050.04817.66
5.6.120.0070.04017.48
5.6.110.0070.04017.55
5.6.100.0050.03517.74
5.6.90.0110.03817.55
5.6.80.0070.02217.29
5.6.70.0030.03817.28
5.6.60.0070.03017.29
5.6.50.0010.04517.11
5.6.40.0050.04317.38
5.6.30.0050.04317.14
5.6.20.0050.04417.34
5.6.10.0090.02017.23
5.6.00.0030.04117.34
5.5.380.0020.03715.71
5.5.370.0060.04815.73
5.5.360.0050.04415.69
5.5.350.0040.03815.72
5.5.340.0050.03015.90
5.5.330.0090.03515.91
5.5.320.0080.04215.88
5.5.310.0070.03515.96
5.5.300.0030.03015.95
5.5.290.0030.03115.93
5.5.280.0030.03315.95
5.5.270.0070.04215.94
5.5.260.0040.04315.88
5.5.250.0110.04015.82
5.5.240.0080.03515.58
5.5.230.0020.03915.60
5.5.220.0020.03015.58
5.5.210.0070.03815.59
5.5.200.0080.03815.54
5.5.190.0050.02015.61
5.5.180.0030.03315.54
5.5.170.0070.00311.00
5.5.160.0040.03715.63
5.5.150.0020.04515.63
5.5.140.0070.03515.55
5.5.130.0060.02515.63
5.5.120.0030.04515.57
5.5.110.0070.04315.54
5.5.100.0050.02315.59
5.5.90.0070.03715.51
5.5.80.0030.03915.53
5.5.70.0070.04015.59
5.5.60.0090.03915.52
5.5.50.0020.04415.57
5.5.40.0050.04115.54
5.5.30.0060.03615.51
5.5.20.0070.04115.62
5.5.10.0120.03515.58
5.5.00.0090.03315.51
5.4.450.0030.03215.15
5.4.440.0080.03015.23
5.4.430.0070.03915.06
5.4.420.0080.03715.12
5.4.410.0080.04015.21
5.4.400.0070.04114.96
5.4.390.0090.03515.08
5.4.380.0020.04614.89
5.4.370.0060.02815.05
5.4.360.0090.02115.04
5.4.350.0030.03914.94
5.4.340.0070.03915.02
5.4.330.0100.00011.00
5.4.320.0030.04515.09
5.4.310.0060.03315.02
5.4.300.0030.04515.02
5.4.290.0100.03414.98
5.4.280.0100.03515.01
5.4.270.0050.04015.11
5.4.260.0080.03314.91
5.4.250.0050.03515.06
5.4.240.0000.03114.98
5.4.230.0100.03315.06
5.4.220.0110.03615.03
5.4.210.0020.04415.04
5.4.200.0030.02315.03
5.4.190.0050.03915.02
5.4.180.0050.04515.07
5.4.170.0110.03415.06
5.4.160.0060.02515.04
5.4.150.0050.03814.96
5.4.140.0070.04213.66
5.4.130.0080.03513.68
5.4.120.0050.04013.69
5.4.110.0060.03713.71
5.4.100.0070.03313.61
5.4.90.0050.03713.72
5.4.80.0070.04413.62
5.4.70.0080.03413.64
5.4.60.0050.03813.66
5.4.50.0050.04013.70
5.4.40.0130.03113.63
5.4.30.0100.03813.66
5.4.20.0020.04213.65
5.4.10.0100.03513.65
5.4.00.0070.03713.40
5.3.290.0050.04212.81
5.3.280.0040.04512.72
5.3.270.0030.04512.79
5.3.260.0090.03612.73
5.3.250.0100.03512.73
5.3.240.0060.03712.73
5.3.230.0070.04112.79
5.3.220.0050.04212.76
5.3.210.0050.04312.77
5.3.200.0020.04212.75
5.3.190.0030.02312.69
5.3.180.0050.04312.76
5.3.170.0030.02512.77
5.3.160.0030.04012.73
5.3.150.0070.04012.75
5.3.140.0050.02512.68
5.3.130.0030.04212.75
5.3.120.0040.03912.70
5.3.110.0070.03712.69
5.3.100.0080.02212.52
5.3.90.0020.04212.43
5.3.80.0030.03212.43
5.3.70.0050.04512.50
5.3.60.0050.03712.38
5.3.50.0090.01812.36
5.3.40.0070.03712.36
5.3.30.0070.03512.45
5.3.20.0000.03712.34
5.3.10.0040.03812.25
5.3.00.0020.02312.30
5.2.170.0050.03011.03
5.2.160.0040.01511.09
5.2.150.0080.03010.97
5.2.140.0030.02611.00
5.2.130.0020.03210.98
5.2.120.0030.03011.05
5.2.110.0030.03311.04
5.2.100.0030.03111.08
5.2.90.0060.03011.06
5.2.80.0050.02910.97
5.2.70.0020.03411.03
5.2.60.0070.03311.02
5.2.50.0020.02610.91
5.2.40.0030.03610.90
5.2.30.0090.02810.96
5.2.20.0040.03010.99
5.2.10.0040.03210.89
5.2.00.0060.02810.88
5.1.60.0020.02710.41
5.1.50.0060.02010.50
5.1.40.0020.01710.50
5.1.30.0020.02810.70
5.1.20.0030.01810.70
5.1.10.0030.02810.54
5.1.00.0040.02510.45
5.0.50.0050.0219.91
5.0.40.0020.0169.91
5.0.30.0020.0209.91
5.0.20.0050.0199.91
5.0.10.0050.0209.91
5.0.00.0020.0359.91
4.4.90.0000.0189.91
4.4.80.0000.0169.91
4.4.70.0000.0169.91
4.4.60.0030.0189.91
4.4.50.0020.0139.91
4.4.40.0030.0139.91
4.4.30.0020.0109.91
4.4.20.0050.0109.91
4.4.10.0040.0129.91
4.4.00.0000.0249.91
4.3.110.0000.0179.91
4.3.100.0050.0159.91
4.3.90.0050.0159.91
4.3.80.0020.0209.91
4.3.70.0030.0159.91
4.3.60.0000.0179.91
4.3.50.0020.0209.91
4.3.40.0000.0229.91
4.3.30.0020.0199.91
4.3.20.0020.0129.91
4.3.10.0020.0189.91
4.3.00.0000.0209.91

preferences:
44.12 ms | 401 KiB | 5 Q