3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Function to reverse $arr from start to end*/ function reverseArray(&$arr, $start=0): void { $end = count($arr)-1; while ($start < $end) { [$arr[$start],$arr[$end]] = [$arr[$end],$arr[$start]]; $start++; $end--; } } $a = [1,2,3,4]; reverseArray($a); 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.0100.01016.58
8.3.60.0070.01118.27
8.3.50.0210.00016.50
8.3.40.0040.01118.53
8.3.30.0100.00318.76
8.3.20.0000.00721.90
8.3.10.0050.00322.09
8.3.00.0080.00023.66
8.2.190.0070.01116.58
8.2.180.0140.00018.29
8.2.170.0060.01222.96
8.2.160.0120.00922.96
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0050.00220.84
8.2.110.0070.00421.11
8.2.100.0110.00017.72
8.2.90.0080.00017.69
8.2.80.0050.00319.06
8.2.70.0070.00558.76
8.2.60.0050.00317.63
8.2.50.0000.00818.10
8.2.40.0030.00519.47
8.2.30.0050.00219.32
8.2.20.0040.00418.19
8.2.10.0070.00019.32
8.2.00.0040.00419.27
8.1.280.0150.00425.92
8.1.270.0030.00623.97
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00322.18
8.1.230.0040.00720.90
8.1.220.0030.00517.74
8.1.210.0000.00818.95
8.1.200.0030.00617.35
8.1.190.0040.00417.22
8.1.180.0050.00519.09
8.1.170.0080.00018.52
8.1.160.0030.00319.02
8.1.150.0030.00618.90
8.1.140.0080.00020.71
8.1.130.0030.00320.23
8.1.120.0070.00017.46
8.1.110.0000.00717.49
8.1.100.0000.00817.48
8.1.90.0000.00717.50
8.1.80.0090.00017.51
8.1.70.0070.00017.34
8.1.60.0000.00717.58
8.1.50.0000.00817.49
8.1.40.0040.00417.41
8.1.30.0030.00617.70
8.1.20.0050.00317.61
8.1.10.0040.00417.56
8.1.00.0030.00517.51
8.0.300.0070.00020.00
8.0.290.0070.00016.63
8.0.280.0070.00018.32
8.0.270.0080.00016.84
8.0.260.0030.00320.09
8.0.250.0030.00316.94
8.0.240.0030.00316.86
8.0.230.0070.00017.00
8.0.220.0000.00716.92
8.0.210.0000.00716.86
8.0.200.0000.00616.99
8.0.190.0030.00316.94
8.0.180.0000.00816.91
8.0.170.0030.00616.89
8.0.160.0070.00016.82
8.0.150.0000.00716.78
8.0.140.0000.00716.79
8.0.130.0040.00515.19
8.0.120.0050.00416.82
8.0.110.0020.00716.75
8.0.100.0020.00716.84
8.0.90.0060.00416.74
8.0.80.0110.00616.89
8.0.70.0010.00616.82
8.0.60.0010.00816.85
8.0.50.0000.00916.84
8.0.30.0030.01017.07
8.0.20.0100.01716.87
8.0.10.0030.00616.93
8.0.00.0060.00816.79
7.4.330.0020.00216.76
7.4.320.0000.00616.52
7.4.300.0030.00316.39
7.4.290.0030.00316.68
7.4.280.0080.00016.67
7.4.270.0100.00016.53
7.4.260.0030.00414.86
7.4.250.0060.00216.53
7.4.240.0060.00616.48
7.4.230.0110.00216.36
7.4.220.0050.00416.59
7.4.210.0100.00716.49
7.4.200.0060.00816.49
7.4.190.0140.00416.34
7.4.180.0110.00616.38
7.4.160.0090.01016.52
7.4.150.0120.00316.42
7.4.140.0090.00816.34
7.4.130.0100.00916.51
7.4.120.0120.00616.37
7.4.110.0110.00716.42
7.4.100.0100.00616.35
7.4.90.0110.00816.39
7.4.80.0110.01017.85
7.4.70.0130.00416.34
7.4.60.0110.00416.42
7.4.50.0110.00316.19
7.4.40.0110.00516.25
7.4.30.0150.00616.25
7.4.20.0100.00816.38
7.4.10.0130.00416.40
7.4.00.0100.00716.38
7.3.330.0100.00515.75
7.3.320.0110.00314.64
7.3.310.0080.00516.21
7.3.300.0020.00616.38
7.3.290.0080.00916.34
7.3.280.0130.00716.22
7.3.270.0170.00315.79
7.3.260.0120.01016.40
7.3.250.0150.00416.16
7.3.240.0100.00716.42
7.3.230.0150.00416.28
7.3.220.0150.00416.35
7.3.210.0130.00616.36
7.3.200.0090.01016.32
7.3.190.0120.00716.44
7.3.180.0130.00516.22
7.3.170.0100.00716.34
7.3.160.0070.01016.40
7.3.150.0210.00016.05
7.3.140.0180.00516.07
7.3.130.0130.00716.34
7.3.120.0120.00716.28
7.3.110.0070.01016.26
7.3.100.0120.00916.31
7.3.90.0140.00516.32
7.3.80.0090.00616.28
7.3.70.0060.01116.45
7.3.60.0100.00816.43
7.3.50.0070.01016.39
7.3.40.0120.00716.39
7.3.30.0090.00816.34
7.3.20.0120.00716.44
7.3.10.0120.00716.42
7.3.00.0130.00716.33
7.2.340.0190.00716.43
7.2.330.0170.00416.54
7.2.320.0160.00616.36
7.2.310.0140.00616.53
7.2.300.0120.01016.49
7.2.290.0130.00816.44
7.2.280.0160.00616.35
7.2.270.0190.00316.37
7.2.260.0110.01216.52
7.2.250.0100.01116.60
7.2.240.0140.00916.62
7.2.230.0110.00916.40
7.2.220.0140.00616.62
7.2.210.0100.00816.57
7.2.200.0110.01016.55
7.2.190.0150.00516.55
7.2.180.0120.00716.58
7.2.170.0130.00616.59
7.2.160.0130.00616.52
7.2.150.0100.01016.67
7.2.140.0140.00716.54
7.2.130.0150.00616.72
7.2.120.0120.00916.57
7.2.110.0120.00916.54
7.2.100.0100.00916.60
7.2.90.0160.00616.55
7.2.80.0130.00816.63
7.2.70.0120.00916.64
7.2.60.0110.01016.57
7.2.50.0110.01016.59
7.2.40.0070.01316.62
7.2.30.0090.01316.62
7.2.20.0110.01117.16
7.2.10.0110.01017.22
7.2.00.0170.00517.18

preferences:
47.23 ms | 401 KiB | 5 Q