3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [1, 2, 3, 4, 3, 2, 1]; $j = count($a) - 1; $output = []; for($i = 0; $i > count($a); $i++) { if ($a[i] !== $a[j]) { $output = $a[i]; } } print_r($output);

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.00918.43
8.3.50.0120.00620.33
8.3.40.0110.00419.71
8.3.30.0120.00418.59
8.3.20.0000.00824.18
8.3.10.0070.00024.66
8.3.00.0000.00826.16
8.2.180.0130.00725.92
8.2.170.0070.00718.71
8.2.160.0110.00322.96
8.2.150.0000.00725.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0060.00320.51
8.2.100.0110.00018.03
8.2.90.0040.00417.75
8.2.80.0000.00918.66
8.2.70.0000.00817.38
8.2.60.0060.00317.49
8.2.50.0030.00518.04
8.2.40.0040.00418.22
8.2.30.0040.00417.93
8.2.20.0000.00719.25
8.2.10.0050.00218.13
8.2.00.0000.00719.31
8.1.280.0130.00725.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0090.00022.13
8.1.230.0090.00320.89
8.1.220.0040.00418.75
8.1.210.0040.00518.77
8.1.200.0040.00417.22
8.1.190.0000.00817.13
8.1.180.0050.00318.10
8.1.170.0080.00017.62
8.1.160.0030.00619.00
8.1.150.0050.00318.63
8.1.140.0070.00017.45
8.1.130.0030.00319.02
8.1.120.0040.00417.52
8.1.110.0040.00417.46
8.1.100.0000.00817.46
8.1.90.0120.00417.32
8.1.80.0070.01017.32
8.1.70.0110.00717.45
8.1.60.0100.01017.57
8.1.50.0160.00417.35
8.1.40.0150.00417.43
8.1.30.0070.01317.64
8.1.20.0150.00517.57
8.1.10.0110.00817.31
8.1.00.0120.00617.37
8.0.300.0000.00718.77
8.0.290.0030.00516.63
8.0.280.0070.00018.38
8.0.270.0000.00716.67
8.0.260.0000.00618.32
8.0.250.0030.00316.90
8.0.240.0000.00616.89
8.0.230.0000.00716.78
8.0.220.0070.00716.78
8.0.210.0000.01516.73
8.0.200.0160.00016.86
8.0.190.0080.00916.84
8.0.180.0110.00416.88
8.0.170.0120.00316.80
8.0.160.0120.00316.88
8.0.150.0120.00316.75
8.0.140.0100.00516.81
8.0.130.0100.00616.71
8.0.120.0130.00216.84
8.0.110.0120.00216.88
8.0.100.0120.00316.81
8.0.90.0080.00816.83
8.0.80.0130.00316.82
8.0.70.0120.00316.82
8.0.60.0150.00016.91
8.0.50.0110.00416.81
8.0.30.0070.00716.71
8.0.20.0120.00316.86
8.0.10.0120.00316.96
7.4.330.0040.00415.55
7.4.320.0000.00716.50
7.4.300.0120.00516.46
7.4.290.0120.00516.53
7.4.280.0120.00916.44
7.4.270.0170.00216.41
7.4.260.0130.00416.57
7.4.250.0160.00316.59
7.4.240.0120.00516.47
7.4.230.0090.00916.48
7.4.220.0150.00416.50
7.4.210.0110.00416.46
7.4.200.0160.00016.46
7.4.190.0070.00716.55
7.4.180.0090.00516.65
7.4.160.0090.00616.55
7.4.150.0150.00016.55
7.4.140.0080.00616.49
7.4.130.0110.00416.38
7.4.120.0070.00716.39
7.4.110.0090.00616.19
7.4.100.0100.00616.46
7.4.90.0140.00216.51
7.4.80.0100.00516.45
7.4.70.0000.01416.28
7.4.60.0070.00716.36
7.4.50.0090.00716.28
7.4.40.0120.00416.37
7.4.30.0140.00016.25
7.4.20.0150.00016.38
7.4.10.0150.00016.33
7.4.00.0160.00016.44

preferences:
62.05 ms | 401 KiB | 5 Q