3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array(-3,5,1,3,2,10); function array_rev($array) { $half_count = count($array)/2; for ($i = 0; $i <= $half_count; $i++) { $holder = $array[$i]; $array[$i] = $array[(count($array) - ($i + 1))]; $array[count($array) - ($i + 1)] = $holder; } echo $array; } array_rev($x);

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.0170.00318.56
8.3.50.0110.00321.99
8.3.40.0100.01018.69
8.3.30.0100.00319.17
8.3.20.0040.00420.29
8.3.10.0130.00018.63
8.3.00.0080.00019.51
8.2.180.0110.00416.63
8.2.170.0120.00322.96
8.2.160.0130.00320.55
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00020.89
8.2.110.0060.00319.31
8.2.100.0110.00018.03
8.2.90.0000.00819.13
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0000.00818.05
8.2.50.0040.00418.07
8.2.40.0040.00418.09
8.2.30.0030.00619.38
8.2.20.0030.00617.75
8.2.10.0020.00518.11
8.2.00.0040.00417.81
8.1.280.0090.00625.92
8.1.270.0060.00323.91
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0060.00322.65
8.1.230.0100.00019.14
8.1.220.0030.00617.79
8.1.210.0030.00618.77
8.1.200.0040.00417.23
8.1.190.0000.00817.35
8.1.180.0030.00618.10
8.1.170.0040.00418.54
8.1.160.0000.00722.04
8.1.150.0040.00418.85
8.1.140.0000.00817.45
8.1.130.0000.00717.79
8.1.120.0000.00717.52
8.1.110.0050.00217.38
8.1.100.0040.00417.50
8.1.90.0040.00417.50
8.1.80.0000.00717.38
8.1.70.0000.00717.42
8.1.60.0080.00017.58
8.1.50.0070.00317.50
8.1.40.0080.00017.39
8.1.30.0000.00817.66
8.1.20.0050.00217.56
8.1.10.0000.00817.58
8.1.00.0020.00517.55
8.0.300.0040.00318.77
8.0.290.0060.00316.63
8.0.280.0070.00018.40
8.0.270.0030.00317.26
8.0.260.0030.00317.26
8.0.250.0000.00817.02
8.0.240.0040.00417.01
8.0.230.0000.00616.93
8.0.220.0000.00716.95
8.0.210.0050.00316.86
8.0.200.0040.00416.82
8.0.190.0000.00717.04
8.0.180.0040.00416.83
8.0.170.0000.00716.97
8.0.160.0030.00616.84
8.0.150.0000.00716.82
8.0.140.0050.00216.81
8.0.130.0060.00013.42
8.0.120.0040.00417.00
8.0.110.0000.00716.93
8.0.100.0040.00416.86
8.0.90.0080.00016.87
8.0.80.0070.00717.01
8.0.70.0040.00417.03
8.0.60.0000.00716.77
8.0.50.0070.00017.02
8.0.30.0120.00616.94
8.0.20.0090.01817.40
8.0.10.0000.00716.95
8.0.00.0130.00516.85
7.4.330.0000.00515.00
7.4.320.0000.00616.50
7.4.300.0000.00616.37
7.4.290.0030.00316.61
7.4.280.0000.00716.45
7.4.270.0000.00716.60
7.4.260.0070.00016.54
7.4.250.0070.00016.39
7.4.240.0000.00716.63
7.4.230.0040.00416.72
7.4.220.0100.00716.44
7.4.210.0030.01016.54
7.4.200.0070.00016.58
7.4.160.0130.01016.51
7.4.150.0090.00917.40
7.4.140.0130.00617.86
7.4.130.0080.01116.53
7.4.120.0080.00916.65
7.4.110.0130.00316.73
7.4.100.0040.01416.34
7.4.90.0100.00716.32
7.4.80.0190.00619.39
7.4.70.0090.00916.68
7.4.60.0110.01116.66
7.4.50.0000.00816.12
7.4.40.0100.01016.66
7.4.30.0100.00716.64
7.4.00.0070.00314.95
7.3.330.0000.00613.42
7.3.320.0000.00513.29
7.3.310.0070.00016.43
7.3.300.0030.00316.30
7.3.290.0070.01016.35
7.3.280.0080.01216.41
7.3.270.0080.01117.40
7.3.260.0060.01216.53
7.3.250.0070.01016.45
7.3.240.0100.00716.47
7.3.230.0000.02216.50
7.3.210.0100.00616.65
7.3.200.0120.00619.39
7.3.190.0070.01016.71
7.3.180.0070.00716.68
7.3.170.0150.00616.61
7.3.160.0060.01016.38
7.3.120.0060.00714.79
7.3.110.0090.00614.76
7.3.100.0110.00414.86
7.3.90.0040.00714.98
7.3.80.0040.01114.91
7.3.70.0000.01414.92
7.3.60.0040.01114.58
7.3.50.0060.00614.82
7.3.40.0100.00314.66
7.3.30.0000.00914.98
7.3.20.0100.00716.55
7.3.10.0070.00716.71
7.3.00.0070.00716.48
7.2.330.0100.00716.79
7.2.320.0110.00616.86
7.2.310.0120.00916.89
7.2.300.0110.00616.60
7.2.290.0030.01916.48
7.2.240.0090.00914.98
7.2.230.0000.01715.34
7.2.220.0030.01015.39
7.2.210.0060.00614.87
7.2.200.0060.00914.95
7.2.190.0070.00714.77
7.2.180.0030.00915.26
7.2.170.0110.00315.15
7.2.160.0030.01015.25
7.2.150.0110.00716.77
7.2.140.0030.01016.70
7.2.130.0030.01316.93
7.2.120.0040.01216.80
7.2.110.0000.01416.88
7.2.100.0060.01216.99
7.2.90.0100.00717.09
7.2.80.0070.01016.81
7.2.70.0030.01316.82
7.2.60.0090.00716.93
7.2.50.0150.01017.08
7.2.40.0060.01016.81
7.2.30.0130.00717.02
7.2.20.0070.00717.07
7.2.10.0000.00916.87
7.2.00.0030.01617.06
7.1.330.0100.00715.61
7.1.320.0070.00315.50
7.1.310.0030.00615.76
7.1.300.0060.00315.73
7.1.290.0030.00915.89
7.1.280.0030.00515.90
7.1.270.0070.00715.86
7.1.260.0030.01315.77
7.1.250.0000.01215.75
7.1.200.0090.00315.95
7.1.70.0070.00017.08
7.1.60.0000.02119.61
7.1.50.0110.00834.85
7.1.00.0000.08022.31
7.0.200.0000.00716.92
7.0.140.0100.06722.12
7.0.60.0100.08319.90
7.0.50.0130.05717.88
7.0.40.0070.04319.96
7.0.30.0270.06320.32
7.0.20.0300.07720.19
7.0.10.0070.05320.06
7.0.00.0130.07720.15
5.6.280.0100.06721.13
5.6.210.0130.07320.51
5.6.200.0030.08318.19
5.6.190.0030.04020.41
5.6.180.0130.06020.49
5.6.170.0270.06720.55
5.6.160.0030.04020.48
5.6.150.0070.03718.21
5.6.140.0100.03718.13
5.6.130.0030.07018.19
5.6.120.0100.03721.14
5.6.110.0130.08321.12
5.6.100.0070.08321.00
5.6.90.0000.06320.88
5.6.80.0070.08320.49
5.5.350.0270.06020.39
5.5.340.0030.04717.98
5.5.330.0000.04320.31
5.5.320.0230.04320.25
5.5.310.0230.07720.37
5.5.300.0100.07017.97
5.5.290.0070.07318.02
5.5.280.0070.08720.97
5.5.270.0130.03720.87
5.5.260.0100.08320.64
5.5.250.0030.08020.49
5.5.240.3970.04320.16
5.4.450.0430.04719.48
5.4.440.0370.04319.46
5.4.430.0700.05019.48
5.4.420.0800.07019.23
5.4.410.0600.05719.31
5.4.400.0630.05018.89
5.4.390.0770.07719.22
5.4.380.0400.05718.48
5.4.370.0200.07018.73
5.4.360.0400.06318.79
5.4.350.0400.06018.56
5.4.340.0200.06718.52
5.4.320.0030.03912.50
5.4.310.0100.04112.50
5.4.300.0100.04312.51
5.4.290.0100.04312.50
5.4.280.0070.04012.40
5.4.270.0070.03912.40
5.4.260.0080.04012.39
5.4.250.0090.04412.39
5.4.240.0060.03812.39
5.4.230.0050.03912.39
5.4.220.0060.03612.39
5.4.210.0070.03412.39
5.4.200.0090.03412.39
5.4.190.0100.04012.38
5.4.180.0090.03812.39
5.4.170.0050.03712.39
5.4.160.0050.03612.39
5.4.150.0040.03912.39
5.4.140.0060.03912.07
5.4.130.0040.03712.06
5.4.120.0120.04312.01
5.4.110.0060.03912.02
5.4.100.0070.03812.02
5.4.90.0070.03812.02
5.4.80.0050.03812.01
5.4.70.0090.03112.01
5.4.60.0040.03612.01
5.4.50.0030.03812.01
5.4.40.0050.04012.00
5.4.30.0060.03611.99
5.4.20.0120.03111.99
5.4.10.0040.03611.99
5.4.00.0020.03911.48
5.3.290.0080.04312.80
5.3.280.0090.03912.71
5.3.270.0040.04212.73
5.3.260.0040.04112.71
5.3.250.0090.04012.72
5.3.240.0070.04312.72
5.3.230.0110.04812.71
5.3.220.0050.04012.68
5.3.210.0040.04012.68
5.3.200.0070.04512.68
5.3.190.0050.03912.68
5.3.180.0050.04212.67
5.3.170.0090.03712.67
5.3.160.0040.03912.67
5.3.150.0090.04312.67
5.3.140.0080.04012.66
5.3.130.0090.03812.66
5.3.120.0120.04312.66
5.3.110.0130.03612.66
5.3.100.0060.04612.11
5.3.90.0060.03512.10
5.3.80.0070.04112.09
5.3.70.0080.03312.09
5.3.60.0030.03712.08
5.3.50.0080.04312.02
5.3.40.0050.04312.02
5.3.30.0080.03511.98
5.3.20.0060.03711.77
5.3.10.0060.03911.73
5.3.00.0080.04111.71
5.2.170.0010.0339.22
5.2.160.0050.0339.22
5.2.150.0050.0329.22
5.2.140.0040.0309.22
5.2.130.0090.0309.18
5.2.120.0060.0259.18
5.2.110.0030.0299.18
5.2.100.0050.0279.17
5.2.90.0020.0329.17
5.2.80.0080.0309.17
5.2.70.0030.0329.16
5.2.60.0050.0299.13
5.2.50.0070.0319.10
5.2.40.0060.0369.07
5.2.30.0080.0299.05
5.2.20.0050.0299.04
5.2.10.0050.0358.94
5.2.00.0050.0298.80
5.1.60.0080.0228.09
5.1.50.0040.0268.08
5.1.40.0040.0248.06
5.1.30.0050.0248.41
5.1.20.0080.0248.43
5.1.10.0030.0288.16
5.1.00.0050.0258.16
5.0.50.0030.0216.64
5.0.40.0020.0206.50
5.0.30.0040.0306.31
5.0.20.0030.0196.27
5.0.10.0030.0196.26
5.0.00.0030.0306.25
4.4.90.0050.0174.77
4.4.80.0050.0164.76
4.4.70.0030.0244.76
4.4.60.0020.0164.76
4.4.50.0020.0154.77
4.4.40.0030.0244.71
4.4.30.0010.0174.76
4.4.20.0030.0154.84
4.4.10.0030.0144.85
4.4.00.0040.0234.76
4.3.110.0030.0154.67
4.3.100.0010.0174.66
4.3.90.0040.0154.64
4.3.80.0040.0244.58
4.3.70.0030.0254.63
4.3.60.0010.0154.63
4.3.50.0040.0134.63
4.3.40.0030.0284.54
4.3.30.0000.0243.30
4.3.20.0010.0163.28
4.3.10.0010.0153.24
4.3.00.0030.01014.59

preferences:
53.72 ms | 401 KiB | 5 Q