3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array(-3,5,1,3,2,10); function array_rev($array) { for ($i = 0; $i <= count($array)/2; $i++) { $holder = $array[$i]; $array[$i] = $array[count($array) - ($i + 1)]; echo $array[$i] + " "; $array[count($array) - ($i + 1)] = $holder; echo $array[count($array) - ($i + 1)]; } } 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.0090.00916.50
8.3.50.0120.00721.94
8.3.40.0070.00719.02
8.3.30.0080.00619.27
8.3.20.0040.00420.16
8.3.10.0080.00418.91
8.3.00.0050.00319.51
8.2.180.0110.00416.50
8.2.170.0080.00622.96
8.2.160.0040.01120.38
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00021.16
8.2.110.0060.00322.03
8.2.100.0090.00317.97
8.2.90.0070.00019.21
8.2.80.0000.00817.97
8.2.70.0040.00417.75
8.2.60.0030.00618.05
8.2.50.0080.00018.07
8.2.40.0080.00018.09
8.2.30.0080.00019.55
8.2.20.0040.00417.72
8.2.10.0050.00318.04
8.2.00.0000.00817.77
8.1.280.0170.00325.92
8.1.270.0030.00622.09
8.1.260.0030.00326.35
8.1.250.0070.00028.09
8.1.240.0040.00423.83
8.1.230.0040.00719.14
8.1.220.0040.00417.76
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.36
8.1.180.0060.00318.10
8.1.170.0080.00018.65
8.1.160.0040.00421.92
8.1.150.0040.00418.89
8.1.140.0040.00417.52
8.1.130.0070.00017.74
8.1.120.0050.00217.49
8.1.110.0000.00817.49
8.1.100.0000.00717.45
8.1.90.0050.00317.34
8.1.80.0030.00517.50
8.1.70.0000.00717.40
8.1.60.0040.00717.64
8.1.50.0040.00417.54
8.1.40.0040.00417.50
8.1.30.0030.00617.67
8.1.20.0000.00717.62
8.1.10.0000.00717.57
8.1.00.0000.00717.42
8.0.300.0050.00218.77
8.0.290.0080.00016.58
8.0.280.0030.00318.35
8.0.270.0000.00717.26
8.0.260.0030.00317.25
8.0.250.0040.00417.06
8.0.240.0030.00516.98
8.0.230.0000.00717.02
8.0.220.0050.00316.98
8.0.210.0000.00716.97
8.0.200.0060.00016.93
8.0.190.0030.00516.93
8.0.180.0000.00716.96
8.0.170.0040.00416.99
8.0.160.0040.00416.93
8.0.150.0040.00416.85
8.0.140.0000.00816.92
8.0.130.0030.00313.41
8.0.120.0000.00716.86
8.0.110.0040.00416.88
8.0.100.0020.00516.78
8.0.90.0040.00416.73
8.0.80.0100.00716.91
8.0.70.0040.00416.79
8.0.60.0050.00316.84
8.0.50.0050.00216.80
8.0.30.0100.00917.08
8.0.20.0150.00717.40
8.0.10.0000.00716.95
8.0.00.0090.01416.84
7.4.330.0050.00015.09
7.4.320.0000.00616.61
7.4.300.0000.00716.57
7.4.290.0030.00316.61
7.4.280.0040.00416.59
7.4.270.0070.00016.50
7.4.260.0030.00316.63
7.4.250.0000.00816.55
7.4.240.0020.00616.58
7.4.230.0030.00316.57
7.4.220.0170.00616.69
7.4.210.0000.01316.70
7.4.200.0030.00316.50
7.4.160.0090.01216.49
7.4.150.0100.01017.40
7.4.140.0080.01017.86
7.4.130.0090.00816.52
7.4.120.0040.01316.61
7.4.110.0110.00516.48
7.4.100.0160.00716.52
7.4.90.0000.01716.40
7.4.80.0080.01219.39
7.4.70.0130.00416.37
7.4.60.0060.01116.41
7.4.50.0040.00416.63
7.4.40.0030.01416.55
7.4.30.0060.01016.43
7.4.00.0100.00315.06
7.3.330.0030.00313.34
7.3.320.0060.00013.41
7.3.310.0030.00316.31
7.3.300.0030.00316.37
7.3.290.0060.01216.44
7.3.280.0070.00916.42
7.3.270.0120.00617.40
7.3.260.0070.01016.48
7.3.250.0100.00816.38
7.3.240.0150.00316.53
7.3.230.0130.00316.46
7.3.210.0080.01416.38
7.3.200.0090.00919.39
7.3.190.0060.01016.47
7.3.180.0030.01316.61
7.3.170.0170.00316.71
7.3.160.0080.00816.40
7.3.00.0120.00316.53
7.2.330.0110.00716.75
7.2.320.0070.01016.40
7.2.310.0030.01316.80
7.2.300.0080.00816.68
7.2.290.0120.00916.51
7.2.130.0000.01317.20
7.2.120.0070.00717.09
7.2.110.0030.01016.98
7.2.100.0040.01116.97
7.2.90.0070.00717.17
7.2.80.0060.00616.85
7.2.70.0000.01317.16
7.2.60.0070.00816.98
7.2.50.0150.00016.84
7.2.40.0070.01316.86
7.2.30.0040.01116.99
7.2.20.0040.01116.79
7.2.10.0030.00717.14
7.2.00.0040.01118.07
7.1.250.0040.01115.91
7.1.240.0040.00715.61
7.1.230.0070.00716.00
7.1.220.0130.00015.72
7.1.210.0000.01115.61
7.1.200.0050.00615.88
7.1.190.0100.00315.95
7.1.180.0060.00615.79
7.1.170.0040.00815.81
7.1.160.0060.00615.82
7.1.150.0070.00715.84
7.1.140.0070.00415.82
7.1.130.0040.00915.81
7.1.120.0070.01015.43
7.1.110.0070.00716.02
7.1.100.0040.00716.88
7.1.90.0030.01115.80
7.1.80.0030.01015.48
7.1.70.0080.00416.20
7.1.60.0060.01217.56
7.1.50.0060.00616.35
7.1.40.0080.00316.02
7.1.30.0070.00715.89
7.1.20.0100.00315.95
7.1.10.0040.00415.96
7.1.00.0050.04219.07
7.0.330.0000.01015.44
7.0.320.0080.00815.21
7.0.310.0030.00915.49
7.0.300.0030.01015.34
7.0.290.0070.00715.27
7.0.280.0030.00615.52
7.0.270.0000.01315.39
7.0.260.0090.00615.15
7.0.250.0110.00315.39
7.0.240.0060.00615.48
7.0.230.0070.00315.47
7.0.220.0000.01315.18
7.0.210.0030.00615.08
7.0.200.0060.00416.00
7.0.190.0000.01215.30
7.0.180.0040.00815.46
7.0.170.0000.00915.25
7.0.160.0120.00315.13
7.0.150.0000.01315.37
7.0.140.0050.04018.67
7.0.130.0110.00015.35
7.0.120.0030.01015.19
7.0.110.0030.04417.50
7.0.100.0110.04017.68
7.0.90.0080.04017.69
7.0.80.0060.04017.69
7.0.70.0110.03717.72
7.0.60.0030.02717.68
7.0.50.0070.03717.61
7.0.40.0020.03216.57
7.0.30.0060.03316.54
7.0.20.0080.02316.41
7.0.10.0050.02916.62
7.0.00.0050.04616.46
5.6.380.0090.00614.77
5.6.370.0110.00414.80
5.6.360.0030.01113.99
5.6.350.0070.00714.61
5.6.340.0120.00614.29
5.6.330.0050.00514.38
5.6.320.0070.00714.33
5.6.310.0040.00914.28
5.6.300.0000.01114.14
5.6.290.0060.00914.31
5.6.280.0050.04217.47
5.6.270.0100.00314.20
5.6.260.0070.04017.50
5.6.250.0030.04517.49
5.6.240.0080.04017.66
5.6.230.0050.03217.52
5.6.220.0090.04417.45
5.6.210.0060.02617.52
5.6.200.0120.03517.63
5.6.190.0080.02617.46
5.6.180.0070.02217.74
5.6.170.0120.02517.32
5.6.160.0070.03817.48
5.6.150.0070.04317.42
5.6.140.0130.04117.52
5.6.130.0090.02017.49
5.6.120.0060.03317.56
5.6.110.0120.02017.39
5.6.100.0130.02517.51
5.6.90.0090.04117.43
5.6.80.0080.02317.09
5.6.70.0050.02717.14
5.6.60.0070.03817.28
5.6.50.0080.03217.16
5.6.40.0050.04317.10
5.6.30.0030.04617.04
5.6.20.0050.04817.25
5.6.10.0030.03817.12
5.6.00.0040.04217.21
5.5.380.0050.03814.52
5.5.370.0080.04014.48
5.5.360.0050.04014.48
5.5.350.0060.04014.53
5.5.340.0050.04214.60
5.5.330.0060.04314.56
5.5.320.0030.03814.67
5.5.310.0090.02014.57
5.5.300.0070.04014.61
5.5.290.0060.04314.46
5.5.280.0040.04514.71
5.5.270.0070.03714.75
5.5.260.0040.04414.78
5.5.250.0090.02814.53
5.5.240.0080.03514.40
5.5.230.0030.04014.22
5.5.220.0070.02414.23
5.5.210.0000.04514.32
5.5.200.0100.02314.36
5.5.190.0070.02214.24
5.5.180.0030.03814.42
5.5.170.0060.00611.00
5.5.160.0070.03814.36
5.5.150.0090.03714.40
5.5.140.0070.03814.14
5.5.130.0070.02214.46
5.5.120.0050.03914.41
5.5.110.0030.04314.14
5.5.100.0060.04114.26
5.5.90.0030.04014.38
5.5.80.0070.03814.17
5.5.70.0030.03314.04
5.5.60.0000.04314.29
5.5.50.0070.03814.28
5.5.40.0100.01814.11
5.5.30.0070.03814.05
5.5.20.0070.02614.19
5.5.10.0020.04414.24
5.5.00.0080.03114.23
5.4.450.0070.03315.28
5.4.440.0110.03715.32
5.4.430.0030.03815.28
5.4.420.0050.04415.32
5.4.410.0040.04115.11
5.4.400.0060.04015.17
5.4.390.0090.02915.16
5.4.380.0050.02415.09
5.4.370.0050.03815.12
5.4.360.0020.03515.02
5.4.350.0050.02615.09
5.4.340.0080.03315.08
5.4.330.0030.00611.00
5.4.320.0050.03515.11
5.4.310.0090.03615.15
5.4.300.0070.03715.19
5.4.290.0080.03215.09
5.4.280.0020.04715.39
5.4.270.0030.04115.11
5.4.260.0080.03915.01
5.4.250.0050.02315.20
5.4.240.0020.02715.00
5.4.230.0070.03815.13
5.4.220.0130.01715.13
5.4.210.0050.04214.97
5.4.200.0070.02215.09
5.4.190.0030.04315.06
5.4.180.0060.02615.12
5.4.170.0060.03815.02
5.4.160.0070.03215.09
5.4.150.0060.04015.13
5.4.140.0020.03613.73
5.4.130.0060.03813.86
5.4.120.0070.03714.02
5.4.110.0130.02113.82
5.4.100.0050.03813.87
5.4.90.0160.01613.85
5.4.80.0020.02813.71
5.4.70.0050.03513.91
5.4.60.0120.03713.76
5.4.50.0080.02313.86
5.4.40.0050.02313.84
5.4.30.0030.03613.77
5.4.20.0020.04313.74
5.4.10.0030.03013.72
5.4.00.0050.04013.38
5.3.290.0070.02212.85
5.3.280.0070.02312.73
5.3.270.0080.02112.79
5.3.260.0050.03812.78
5.3.250.0040.02612.87
5.3.240.0060.02212.80
5.3.230.0070.02212.85
5.3.220.0020.04012.76
5.3.210.0070.04212.71
5.3.200.0000.02312.80
5.3.190.0030.04312.71
5.3.180.0080.03412.83
5.3.170.0020.02512.76
5.3.160.0060.04012.82
5.3.150.0030.04012.85
5.3.140.0060.03612.71
5.3.130.0050.04212.75
5.3.120.0030.03012.82
5.3.110.0060.02112.75
5.3.100.0020.04212.45
5.3.90.0020.03312.52
5.3.80.0120.03312.52
5.3.70.0070.03812.63
5.3.60.0090.02212.54
5.3.50.0120.02312.55
5.3.40.0080.04012.51
5.3.30.0050.03512.46
5.3.20.0060.02212.39
5.3.10.0080.03612.39
5.3.00.0060.03612.39
5.2.170.0030.02011.46
5.2.160.0020.03111.46
5.2.150.0030.03311.46
5.2.140.0030.02311.46
5.2.130.0020.02811.46
5.2.120.0040.02711.46
5.2.110.0020.02911.46
5.2.100.0050.02311.46
5.2.90.0060.02711.46
5.2.80.0010.03511.46
5.2.70.0000.03711.46
5.2.60.0030.02811.46
5.2.50.0070.02511.46
5.2.40.0040.03411.46
5.2.30.0070.02811.46
5.2.20.0030.03011.46
5.2.10.0030.02511.46
5.2.00.0030.02511.46
5.1.60.0030.02611.46
5.1.50.0040.02711.46
5.1.40.0120.02011.46
5.1.30.0060.01311.46
5.1.20.0030.02911.46
5.1.10.0070.02711.46
5.1.00.0070.02311.46
5.0.50.0030.02411.46
5.0.40.0080.01811.46
5.0.30.0080.03011.46
5.0.20.0040.02211.46
5.0.10.0030.01211.46
5.0.00.0050.02111.46
4.4.90.0030.01811.46
4.4.80.0020.01711.46
4.4.70.0000.01911.46
4.4.60.0020.01511.46
4.4.50.0030.01711.46
4.4.40.0030.02511.46
4.4.30.0020.01211.46
4.4.20.0000.02011.46
4.4.10.0020.02011.46
4.4.00.0000.02911.46
4.3.110.0020.02111.46
4.3.100.0030.01011.46
4.3.90.0020.01611.46
4.3.80.0020.01911.46
4.3.70.0030.01311.46
4.3.60.0020.02011.46
4.3.50.0020.02011.46
4.3.40.0000.03111.46
4.3.30.0010.02111.46
4.3.20.0010.01311.46
4.3.10.0000.01611.46
4.3.00.0020.01711.46

preferences:
51.76 ms | 401 KiB | 5 Q