3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Arrays to hold the numbers for this demo $arr1 = array(5,6,7,8); $arr2 = array(2,5,6); $arr3 = array_values(array_diff($arr1, $arr2)); // Correct result but in wrong positions in the array var_dump($arr3); // array(2) { [2]=> int(7) [3]=> int(8) } ?>

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.0110.01118.55
8.3.50.0030.01016.15
8.3.40.0070.00718.50
8.3.30.0070.00718.55
8.3.20.0070.00720.29
8.3.10.0000.00823.46
8.3.00.0030.00722.43
8.2.180.0130.00325.92
8.2.170.0150.00622.96
8.2.160.0100.01020.91
8.2.150.0030.00524.18
8.2.140.0000.01424.66
8.2.130.0000.00726.16
8.2.120.0050.00319.77
8.2.110.0030.00722.08
8.2.100.0070.00717.78
8.2.90.0040.00417.72
8.2.80.0040.00418.93
8.2.70.0040.00417.93
8.2.60.0080.00018.05
8.2.50.0040.00418.10
8.2.40.0000.00819.21
8.2.30.0040.00419.10
8.2.20.0000.00717.86
8.2.10.0000.00719.29
8.2.00.0000.00717.96
8.1.280.0100.00725.92
8.1.270.0080.00022.07
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00419.11
8.1.230.0000.01120.88
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0040.00717.23
8.1.190.0060.00317.39
8.1.180.0040.00418.10
8.1.170.0050.00318.47
8.1.160.0070.00018.80
8.1.150.0070.00018.68
8.1.140.0030.00522.17
8.1.130.0070.00020.27
8.1.120.0070.00017.35
8.1.110.0000.00717.38
8.1.100.0060.00317.42
8.1.90.0040.00417.34
8.1.80.0040.00417.38
8.1.70.0060.00317.46
8.1.60.0000.00717.53
8.1.50.0040.00417.42
8.1.40.0000.00717.42
8.1.30.0020.00517.48
8.1.20.0000.00817.53
8.1.10.0070.00017.35
8.1.00.0060.00317.33
8.0.300.0000.00820.21
8.0.290.0000.00716.63
8.0.280.0030.00518.30
8.0.270.0070.00017.09
8.0.260.0030.00318.36
8.0.250.0040.00416.88
8.0.240.0060.00016.79
8.0.230.0000.00716.94
8.0.220.0070.00016.87
8.0.210.0000.00716.69
8.0.200.0000.00616.80
8.0.190.0030.00316.82
8.0.180.0000.00816.82
8.0.170.0060.00316.88
8.0.160.0100.00216.79
8.0.150.0030.00516.73
8.0.140.0080.00016.63
8.0.130.0090.00013.19
8.0.120.0000.00816.86
8.0.110.0040.00416.71
8.0.100.0030.00316.83
8.0.90.0030.00316.87
8.0.80.0000.01616.88
8.0.70.0040.00416.74
8.0.60.0080.00016.82
8.0.50.0040.00416.80
8.0.30.0070.01117.14
8.0.20.0100.01117.06
8.0.10.0040.00416.96
8.0.00.0090.00916.71
7.4.330.0000.00516.80
7.4.320.0070.00016.56
7.4.300.0030.00516.44
7.4.290.0100.00016.53
7.4.280.0070.00016.56
7.4.270.0000.00616.43
7.4.260.0000.00716.33
7.4.250.0000.00716.37
7.4.240.0020.00516.40
7.4.230.0000.00716.50
7.4.220.0050.00216.32
7.4.210.0100.00516.51
7.4.200.0040.00416.32
7.4.160.0090.00716.33
7.4.140.0070.00917.86
7.4.130.0100.01316.41
7.4.120.0090.00916.55
7.4.110.0230.00016.48
7.4.100.0090.01216.37
7.4.90.0030.01516.29
7.4.80.0130.00319.39
7.4.70.0060.01016.23
7.4.60.0100.00716.45
7.4.50.0090.00616.22
7.4.40.0060.01016.45
7.4.00.0070.01014.68
7.3.330.0030.00312.88
7.3.320.0030.00312.86
7.3.310.0040.00416.00
7.3.300.0000.00616.11
7.3.290.0000.00616.19
7.3.280.0090.00716.06
7.3.260.0100.00616.23
7.3.240.0090.01016.22
7.3.230.0060.01216.33
7.3.210.0120.00916.12
7.3.200.0100.00616.00
7.3.190.0160.00416.30
7.3.180.0080.01216.27
7.3.170.0110.00516.29
7.3.160.0120.00616.33
7.3.30.0060.00914.79
7.3.20.1480.01614.70
7.3.10.1140.00314.79
7.3.00.1240.00314.80
7.2.330.0120.00816.53
7.2.320.0190.00316.43
7.2.310.0000.02116.24
7.2.300.0030.01416.25
7.2.290.0120.00616.71
7.2.160.0120.01515.00
7.2.150.1330.00714.80
7.2.140.1420.00714.56
7.2.130.1490.00314.86
7.2.120.1650.00314.79
7.2.110.1210.00714.76
7.2.100.1390.00714.77
7.2.90.1140.00714.89
7.2.80.1390.00014.95
7.2.70.1270.00314.54
7.2.60.1210.00314.53
7.2.50.1170.00714.83
7.2.40.1110.00014.93
7.2.30.1310.01014.98
7.2.20.1080.00315.05
7.2.10.1360.00714.70
7.2.00.1240.00714.90
7.1.270.1470.00013.89
7.1.260.1320.00314.00
7.1.250.1410.00713.70

preferences:
39.24 ms | 400 KiB | 5 Q