3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Function to reverse $arr from start to end*/ function reverseArray(&$arr, $start, $end) { while ($start < $end) { [$arr[$start],$arr[$end]] = [$arr[$end],$arr[$start]]; $start++; $end--; } } $a = [1,2,3,4]; reverseArray($a,0,count($a)-1); print_r($a);

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.70.0130.00316.50
8.3.60.0150.00618.18
8.3.50.0040.01818.04
8.3.40.0070.01118.84
8.3.30.0110.00718.58
8.3.20.0000.00820.92
8.3.10.0060.00920.71
8.3.00.0070.00722.57
8.2.190.0090.00916.77
8.2.180.0130.00418.29
8.2.170.0070.00722.96
8.2.160.0040.01120.29
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0020.00521.05
8.2.110.0100.00021.06
8.2.100.0090.00317.72
8.2.90.0000.00817.75
8.2.80.0000.00918.79
8.2.70.0030.00748.63
8.2.60.0080.00548.63
8.2.50.0130.00048.70
8.2.40.0070.00548.84
8.2.30.0120.00248.76
8.2.20.0040.00548.64
8.2.10.0090.00249.42
8.2.00.0030.00948.76
8.1.280.0110.00425.92
8.1.270.0060.00320.28
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0070.01421.24
8.1.230.0100.00017.89
8.1.220.0030.00517.78
8.1.210.0040.00418.77
8.1.200.0070.00748.34
8.1.190.0100.00348.23
8.1.180.0080.00648.71
8.1.170.0080.00448.92
8.1.160.0110.00149.11
8.1.150.0090.00349.12
8.1.140.0070.00549.83
8.1.130.0070.00448.34
8.1.120.0090.00448.41
8.1.110.0050.00748.41
8.1.100.0060.00748.41
8.1.90.0040.00748.38
8.1.80.0070.00548.37
8.1.70.0060.00648.41
8.1.60.0070.00648.47
8.1.50.0110.00248.42
8.1.40.0080.00448.44
8.1.30.0120.00348.45
8.1.20.0090.00448.44
8.1.10.0100.00532.92
8.1.00.0110.00432.88
8.0.300.0000.00718.77
8.0.290.0060.00748.04
8.0.280.0110.00048.87
8.0.270.0090.00348.28
8.0.260.0060.00648.08
8.0.250.0080.00448.13
8.0.240.0090.00348.14
8.0.230.0090.00448.14
8.0.220.0060.00548.07
8.0.210.0050.00748.09
8.0.200.0040.00948.13
8.0.190.0070.00548.16
8.0.180.0080.00548.16
8.0.170.0110.00248.10
8.0.160.0080.00448.06
8.0.150.0090.00348.09
8.0.140.0090.00432.43
8.0.130.0080.00531.62
8.0.120.0060.00832.45
8.0.110.0090.00432.48
8.0.100.0090.00432.45
8.0.90.0090.00432.42
8.0.80.0090.00732.43
8.0.70.0070.00632.45
8.0.60.0100.00632.36
8.0.50.0080.00732.39
8.0.30.0130.00827.29
8.0.20.0150.00429.46
8.0.10.0100.00832.56
8.0.00.0120.00525.81
7.4.330.0070.00347.44
7.4.320.0060.00547.93
7.4.300.0060.00547.93
7.4.290.0060.00647.93
7.4.280.0050.00847.97
7.4.270.0070.00632.23
7.4.260.0100.00332.24
7.4.250.0100.00532.22
7.4.240.0080.00532.27
7.4.230.0060.00732.25
7.4.220.0080.00432.27
7.4.210.0090.00625.53
7.4.200.0100.00232.21
7.4.190.0090.00637.51
7.4.180.0110.00337.47
7.4.160.0120.00724.38
7.4.150.0140.00632.21
7.4.140.0130.00527.41
7.4.130.0140.00429.03
7.4.120.0110.00729.04
7.4.110.0130.00728.95
7.4.100.0130.00625.45
7.4.90.0130.00825.49
7.4.80.0110.00825.86
7.4.70.0140.00625.41
7.4.60.0120.00625.43
7.4.50.0120.00625.38
7.4.40.0130.00525.36
7.4.30.0110.00727.00
7.4.20.0120.00626.93
7.4.10.0100.00926.95
7.4.00.0100.00525.19
7.3.330.0100.00531.21
7.3.320.0120.00231.20
7.3.310.0120.00232.08
7.3.300.0110.00431.94
7.3.290.0090.00531.95
7.3.280.0120.00726.75
7.3.270.0180.00631.99
7.3.260.0150.00723.37
7.3.250.0150.00732.05
7.3.240.0120.00724.21
7.3.230.0110.00828.97
7.3.220.0140.00726.82
7.3.210.0130.00725.45
7.3.200.0130.00725.34
7.3.190.0150.00625.30
7.3.180.0140.00825.32
7.3.170.0130.00725.36
7.3.160.0120.00725.30
7.3.150.0130.00626.77
7.3.140.0140.00626.84
7.3.130.0130.00726.77
7.3.120.0120.00725.05
7.3.110.0120.00725.03
7.3.100.0130.00723.76
7.3.90.0100.00923.90
7.3.80.0120.00723.78
7.3.70.0110.00723.82
7.3.60.0110.00723.84
7.3.50.0110.00823.83
7.3.40.0110.00823.83
7.3.30.0110.00823.83
7.3.20.0180.00723.27
7.3.10.0140.00623.15
7.3.00.0150.01023.16
7.2.340.0150.00532.10
7.2.330.0130.00925.49
7.2.320.0160.00825.41
7.2.310.0140.00525.45
7.2.300.0120.00825.37
7.2.290.0140.00625.47
7.2.280.0150.00626.89
7.2.270.0150.00726.93
7.2.260.0140.00626.88
7.2.250.0130.01026.86
7.2.240.0120.00725.15
7.2.230.0140.00723.91
7.2.220.0130.00823.90
7.2.210.0140.00423.94
7.2.200.0150.00523.93
7.2.190.0130.00623.90
7.2.180.0130.00723.87
7.2.170.0120.00823.95
7.2.160.0120.00723.97
7.2.150.0170.00723.44
7.2.140.0200.00723.38
7.2.130.0170.00823.35
7.2.120.0150.00823.44
7.2.110.0170.00823.42
7.2.100.0180.00623.48
7.2.90.0270.00823.44
7.2.80.0210.00723.38
7.2.70.0180.00723.44
7.2.60.0180.00823.45
7.2.50.0190.00823.24
7.2.40.0200.00723.42
7.2.30.0210.00923.42
7.2.20.0140.01023.42
7.2.10.0180.00823.39
7.2.00.0220.00623.43
7.1.330.0160.00624.95
7.1.320.0240.00723.48
7.1.310.0130.00723.62
7.1.300.0110.00923.51
7.1.290.0220.00223.40
7.1.280.0140.00723.38
7.1.270.0130.00723.48
7.1.260.0100.00923.48
7.1.250.0200.01022.43
7.1.240.0150.00623.40
7.1.230.0130.00823.43
7.1.220.0130.00923.45
7.1.210.0150.00823.42
7.1.200.0130.00923.48
7.1.190.0260.00623.53
7.1.180.0170.00723.46
7.1.170.0200.00523.36
7.1.160.0210.00723.47
7.1.150.0150.00823.42
7.1.140.0130.01023.44
7.1.130.0130.00923.48
7.1.120.0150.00623.52
7.1.110.0150.00823.54
7.1.100.0130.00923.50
7.1.90.0140.00823.45
7.1.80.0160.00823.44
7.1.70.0140.00723.42
7.1.60.0190.00623.52
7.1.50.0170.00623.47
7.1.40.0180.00723.42
7.1.30.0140.00823.42
7.1.20.0150.00723.41
7.1.10.0150.00723.40
7.1.00.0130.00823.47

preferences:
30.68 ms | 401 KiB | 5 Q