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; $count = count($array); for ($i = 0; $i <= $half_count; $i++) { $holder = $array[$i]; $array[$i] = $array[$count - ($i + 1)]; $array[$count - ($i + 1)] = $holder; } return $array; } echo(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.40.0110.00318.80
8.3.30.0070.01019.22
8.3.20.0000.00820.34
8.3.10.0070.00318.55
8.3.00.0050.00319.51
8.2.170.0090.00922.96
8.2.160.0110.00420.46
8.2.150.0040.01124.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00021.10
8.2.110.0030.00622.12
8.2.100.0040.00717.84
8.2.90.0060.00320.98
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0050.00318.07
8.2.40.0040.00418.09
8.2.30.0070.00319.34
8.2.20.0080.00017.63
8.2.10.0050.00218.07
8.2.00.0040.00417.71
8.1.270.0040.00423.72
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00723.91
8.1.230.0000.01119.01
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00917.22
8.1.190.0060.00317.23
8.1.180.0030.00618.10
8.1.170.0060.00318.59
8.1.160.0040.00421.98
8.1.150.0050.00218.75
8.1.140.0020.00517.35
8.1.130.0000.00717.84
8.1.120.0070.00017.39
8.1.110.0060.00317.47
8.1.100.0000.00717.39
8.1.90.0000.00717.45
8.1.80.0030.00317.54
8.1.70.0030.00317.46
8.1.60.0040.00717.57
8.1.50.0060.00317.54
8.1.40.0040.00417.52
8.1.30.0050.00317.61
8.1.20.0040.00417.54
8.1.10.0040.00417.48
8.1.00.0000.00717.40
8.0.300.0000.00818.77
8.0.290.0000.00716.88
8.0.280.0000.00718.44
8.0.270.0030.00317.19
8.0.260.0040.00417.27
8.0.250.0030.00317.07
8.0.240.0000.00717.04
8.0.230.0040.00417.04
8.0.220.0030.00316.98
8.0.210.0040.00416.98
8.0.200.0000.00716.88
8.0.190.0050.00316.94
8.0.180.0000.00716.96
8.0.170.0030.00517.03
8.0.160.0060.00316.79
8.0.150.0000.00816.88
8.0.140.0070.00016.92
8.0.130.0000.00613.41
8.0.120.0040.00416.91
8.0.110.0000.00716.87
8.0.100.0070.00016.96
8.0.90.0040.00416.96
8.0.80.0100.00716.95
8.0.70.0050.00316.92
8.0.60.0020.00516.95
8.0.50.0040.00416.98
8.0.30.0090.01017.18
8.0.20.0090.01117.44
8.0.10.0080.00017.09
8.0.00.0050.01316.65
7.4.330.0030.00315.01
7.4.320.0030.00316.59
7.4.300.0030.00316.65
7.4.290.0050.00316.48
7.4.280.0000.00716.65
7.4.270.0000.00716.51
7.4.260.0030.00516.44
7.4.250.0040.00416.50
7.4.240.0030.00316.47
7.4.230.0000.00716.51
7.4.220.0060.01616.59
7.4.210.0110.00316.61
7.4.200.0000.00716.40
7.4.160.0030.01316.69
7.4.150.0140.00617.40
7.4.140.0100.01017.86
7.4.130.0080.00916.49
7.4.120.0150.00316.56
7.4.110.0100.00716.48
7.4.100.0070.01016.67
7.4.90.0110.00616.63
7.4.80.0080.01119.39
7.4.70.0110.00516.46
7.4.60.0100.00716.52
7.4.50.0040.00416.46
7.4.40.0100.01016.45
7.4.30.0090.00616.55
7.4.00.0100.00714.97
7.3.330.0030.00313.41
7.3.320.0000.00513.25
7.3.310.0030.00316.30
7.3.300.0000.00716.32
7.3.290.0030.01216.45
7.3.280.0080.00916.44
7.3.270.0110.00717.40
7.3.260.0110.00616.55
7.3.250.0120.00916.51
7.3.240.0140.00516.38
7.3.230.0120.00616.39
7.3.210.0070.01116.57
7.3.200.0110.00719.39
7.3.190.0080.01016.45
7.3.180.0040.01216.59
7.3.170.0150.00316.45
7.3.160.0030.01316.37
7.3.120.0060.01014.85
7.3.110.0090.00714.72
7.3.100.0070.01014.85
7.3.90.0070.00514.79
7.3.80.0110.00514.94
7.3.70.0030.00914.81
7.3.60.0050.01014.77
7.3.50.0070.00714.82
7.3.40.0080.00814.80
7.3.30.0060.00714.71
7.3.20.0070.00516.66
7.3.10.0110.00416.60
7.3.00.0050.01016.70
7.2.330.0130.00316.47
7.2.320.0110.00616.57
7.2.310.0090.00816.50
7.2.300.0130.00316.63
7.2.290.0030.01416.75
7.2.250.0070.01015.01
7.2.240.0100.00615.13
7.2.230.0040.01115.00
7.2.220.0070.00915.07
7.2.210.0050.01015.09
7.2.200.0100.00415.16
7.2.190.0070.00815.00
7.2.180.0060.00815.13
7.2.170.0020.00915.05
7.2.160.0040.00714.92
7.2.150.0110.00216.75
7.2.140.0060.00716.82
7.2.130.0100.00516.73
7.2.120.0090.00417.04
7.2.110.0040.00816.92
7.2.100.0060.00916.83
7.2.90.0050.01116.91
7.2.80.0020.01216.97
7.2.70.0020.01016.81
7.2.60.0060.00816.96
7.2.50.0040.00916.93
7.2.40.0060.00716.88
7.2.30.0050.01116.95
7.2.20.0090.00616.93
7.2.10.0040.00816.78
7.2.00.0040.01116.90
7.1.330.0060.01015.72
7.1.320.0040.01115.81
7.1.310.0040.00815.76
7.1.300.0090.00315.77
7.1.290.0050.00815.81
7.1.280.0060.00715.72
7.1.270.0030.01115.94
7.1.260.0040.00815.69
7.1.250.0060.00515.78
7.1.240.0060.00915.68
7.1.230.0040.00715.61
7.1.220.0070.00415.87
7.1.210.0080.00415.77
7.1.200.0090.00015.69
7.1.190.0070.00715.92
7.1.180.0030.01015.54
7.1.170.0060.00915.99
7.1.160.0060.00615.72
7.1.150.0140.00015.61
7.1.140.0030.00615.68
7.1.130.0000.01315.77
7.1.120.0090.00315.91
7.1.110.0030.01315.97
7.1.100.0120.00315.57
7.1.90.0040.01115.85
7.1.80.0030.00915.68
7.1.70.0050.00516.31
7.1.60.0060.01217.66
7.1.50.0120.01025.40
7.1.40.0030.00615.87
7.1.30.0030.00716.01
7.1.20.0030.01315.85
7.1.10.0000.00915.76
7.1.00.0030.04319.08
7.0.330.0030.00915.60
7.0.320.0000.01215.43
7.0.310.0100.00315.33
7.0.300.0030.01015.21
7.0.290.0060.00615.20
7.0.280.0000.01315.18
7.0.270.0000.01515.53
7.0.260.0120.00015.47
7.0.250.0090.00615.44
7.0.240.0090.00615.28
7.0.230.0030.01015.60
7.0.220.0030.01015.33
7.0.210.0090.00315.41
7.0.200.0020.00916.13
7.0.190.0060.00315.61
7.0.180.0040.00415.37
7.0.170.0070.00715.38
7.0.160.0000.01315.14
7.0.150.0080.00015.18
7.0.140.0060.03818.71
7.0.130.0100.00715.29
7.0.120.0030.00515.55
7.0.110.0040.00815.10
7.0.100.0080.00615.23
7.0.90.0110.00415.31
7.0.80.0070.00715.49
7.0.70.0060.00315.48
7.0.60.0080.03617.64
7.0.50.0070.04016.80
7.0.40.0130.02516.84
7.0.30.0150.04016.81
7.0.20.0150.03416.94
7.0.10.0100.03616.78
7.0.00.0050.03416.75
5.6.400.0030.01014.29
5.6.390.0030.01014.76
5.6.380.0040.01114.58
5.6.370.0030.01014.65
5.6.360.0110.00314.39
5.6.350.0060.00314.59
5.6.340.0070.00714.11
5.6.330.0030.01014.59
5.6.320.0070.01014.57
5.6.310.0030.00914.68
5.6.300.0060.00914.64
5.6.290.0040.01114.70
5.6.280.0050.03817.74
5.6.270.0140.00014.19
5.6.260.0090.00614.75
5.6.250.0060.00314.43
5.6.240.0000.01514.36
5.6.230.0100.00314.32
5.6.220.0090.00314.46
5.6.210.0050.04617.55
5.6.200.0040.02416.29
5.6.190.0130.03717.43
5.6.180.0200.03817.58
5.6.170.0170.01517.53
5.6.160.0030.02817.60
5.6.150.0080.03616.28
5.6.140.0060.04616.34
5.6.130.0080.04316.35
5.6.120.0090.02817.65
5.6.110.0080.03817.75
5.6.100.0070.04717.69
5.6.90.0100.03217.77
5.6.80.0040.03017.27
5.6.70.2310.02517.50
5.6.60.0060.00914.34
5.6.50.0040.01114.22
5.6.40.0070.00714.25
5.6.30.0030.01414.65
5.6.20.0000.01314.41
5.6.10.0070.00414.25
5.6.00.0000.01614.39
5.5.380.0030.01014.22
5.5.370.0060.00314.09
5.5.360.0060.00614.06
5.5.350.0110.03017.42
5.5.340.0030.02716.30
5.5.330.0110.02317.36
5.5.320.0100.03117.43
5.5.310.0220.02717.37
5.5.300.0020.04416.33
5.5.290.0020.02516.23
5.5.280.0120.03817.54
5.5.270.0110.03317.59
5.5.260.0080.02717.54
5.5.250.0070.04217.59
5.5.240.0100.04117.42
5.5.230.0110.00714.38
5.5.220.0110.00714.13
5.5.210.0090.00614.46
5.5.200.0000.01414.22
5.5.190.0040.01414.33
5.5.180.0060.00614.25
5.5.170.0100.00014.19
5.5.160.0090.00914.48
5.5.150.0030.01014.51
5.5.140.0100.01014.71
5.5.130.0070.00414.29
5.5.120.0070.00714.49
5.5.110.0060.00914.50
5.5.100.0130.00314.27
5.5.90.0100.00714.23
5.5.80.0060.00614.42
5.5.70.0110.00414.26
5.5.60.0030.01014.09
5.5.50.0070.00714.40
5.5.40.0060.00614.16
5.5.30.0080.00514.34
5.5.20.0090.00614.48
5.5.10.0000.01214.18
5.5.00.0000.01114.54
5.4.450.0230.02215.41
5.4.440.0130.03515.21
5.4.430.0450.03015.38
5.4.420.0440.02915.48
5.4.410.0370.03215.44
5.4.400.0400.03015.19
5.4.390.0380.03115.10
5.4.380.0160.02714.85
5.4.370.0200.03515.01
5.4.360.0120.03515.14
5.4.350.0180.04015.03
5.4.340.0170.03214.99
5.4.330.0040.00411.33
5.4.320.0030.02911.81
5.4.310.0070.02511.96
5.4.300.0060.02411.76
5.4.290.0060.02111.83
5.4.280.0070.02111.73
5.4.270.0050.02311.94
5.4.260.0040.02211.92
5.4.250.0030.02511.83
5.4.240.0070.02011.73
5.4.230.0110.02211.77
5.4.220.0060.02211.83
5.4.210.0060.02111.68
5.4.200.0080.02211.86
5.4.190.0070.02111.72
5.4.180.0060.02011.86
5.4.170.0050.02311.82
5.4.160.0080.02711.75
5.4.150.0090.02411.88
5.4.140.0040.02611.53
5.4.130.0090.02211.60
5.4.120.0040.02611.56
5.4.110.0070.02111.75
5.4.100.0040.02411.62
5.4.90.0050.02511.64
5.4.80.0080.02411.44
5.4.70.0070.02011.63
5.4.60.0090.02411.62
5.4.50.0070.01911.63
5.4.40.0090.01911.61
5.4.30.0070.02111.66
5.4.20.0060.02311.59
5.4.10.0100.02111.57
5.4.00.0050.02111.22
5.3.290.0080.03912.80
5.3.280.0080.04312.71
5.3.270.0080.05212.72
5.3.260.0070.04212.72
5.3.250.0070.04612.72
5.3.240.0060.03912.72
5.3.230.0080.04112.71
5.3.220.0120.04012.68
5.3.210.0090.04912.68
5.3.200.0060.04012.68
5.3.190.0080.03712.68
5.3.180.0100.03312.67
5.3.170.0080.03612.67
5.3.160.0050.03912.67
5.3.150.0050.03812.67
5.3.140.0040.03912.66
5.3.130.0070.03712.66
5.3.120.0040.04112.66
5.3.110.0060.04012.66
5.3.100.0070.03712.12
5.3.90.0060.03912.10
5.3.80.0070.03712.09
5.3.70.0060.04012.09
5.3.60.0050.03912.07
5.3.50.0060.03612.03
5.3.40.0060.03812.02
5.3.30.0060.03611.98
5.3.20.0060.04111.76
5.3.10.0120.03611.73
5.3.00.0030.03911.72
5.2.170.0050.0359.22
5.2.160.0090.0279.22
5.2.150.0070.0299.21
5.2.140.0060.0339.22
5.2.130.0050.0319.18
5.2.120.0100.0259.18
5.2.110.0080.0299.18
5.2.100.0100.0279.17
5.2.90.0070.0279.18
5.2.80.0030.0309.17
5.2.70.0070.0359.17
5.2.60.0060.0279.13
5.2.50.0040.0299.10
5.2.40.0050.0379.07
5.2.30.0040.0309.05
5.2.20.0080.0309.03
5.2.10.0050.0308.94
5.2.00.0020.0338.80
5.1.60.0060.0228.09
5.1.50.0070.0258.08
5.1.40.0050.0268.06
5.1.30.0040.0308.41
5.1.20.0040.0288.43
5.1.10.0050.0258.16
5.1.00.0040.0278.16
5.0.50.0030.0226.64
5.0.40.0040.0196.50
5.0.30.0020.0316.32
5.0.20.0080.0146.28
5.0.10.0040.0246.26
5.0.00.0070.0266.25
4.4.90.0050.0214.77
4.4.80.0040.0144.75
4.4.70.0030.0164.76
4.4.60.0010.0174.76
4.4.50.0010.0174.77
4.4.40.0020.0264.71
4.4.30.0040.0164.76
4.4.20.0020.0164.84
4.4.10.0030.0164.85
4.4.00.0040.0234.75
4.3.110.0020.0204.67
4.3.100.0030.0144.67
4.3.90.0030.0254.63
4.3.80.0040.0294.59
4.3.70.0020.0224.63
4.3.60.0020.0144.63
4.3.50.0040.0144.63
4.3.40.0010.0284.54
4.3.30.0020.0223.30
4.3.20.0030.0193.28
4.3.10.0040.0173.24
4.3.00.0070.01314.59

preferences:
55.51 ms | 400 KiB | 5 Q