3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [ [ 'id' => '1', 'order' => '123238' ], [ 'id' => '2', 'order' => '33278' ], [ 'id' => '3', 'order' => '8892372' ] ]; $arr2 = [ [ 'id' => '1', 'order' => '349483' ], [ 'id' => '2', 'order' => '9837283' ], [ 'id' => '3', 'order' => '33278' ] ]; // values in both $arr1 and $arr2 print_r(array_uintersect($arr1, $arr2, function ($a, $b) { return $a['order'] - $b['order']; })); // values in $arr1 but not $arr2 print_r(array_udiff($arr1, $arr2, function ($a, $b) { return $a['order'] - $b['order']; })); // values in $arr2 but not $arr1 print_r(array_udiff($arr1, $arr2, function ($a, $b) { return $a['order'] - $b['order']; })); ?>

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.5.10.0070.01119.59
8.5.00.0150.00819.90
8.4.150.0020.00014.05
8.4.140.0060.00317.58
8.4.130.0030.00617.60
8.4.120.0040.00424.06
8.4.110.0060.00521.69
8.4.100.0060.00418.74
8.4.90.0050.00418.99
8.4.80.0130.00618.95
8.4.70.0070.00218.90
8.4.60.0070.00120.81
8.4.50.0070.01118.77
8.4.40.0040.00419.47
8.4.30.0130.00620.08
8.4.20.0070.01419.59
8.4.10.0150.00617.92
8.3.280.0120.00818.32
8.3.270.0100.00616.69
8.3.260.0120.00717.13
8.3.250.0110.00819.02
8.3.240.0100.01017.19
8.3.230.0090.00716.68
8.3.220.0130.00619.11
8.3.210.0070.00218.30
8.3.200.0040.00416.52
8.3.190.0050.00319.01
8.3.180.0090.00918.86
8.3.170.0180.00016.81
8.3.160.0100.00717.17
8.3.150.0030.01016.86
8.3.140.0120.00616.71
8.3.130.0000.00818.18
8.3.120.0090.00018.80
8.3.110.0080.00020.94
8.3.100.0040.00424.06
8.3.90.0070.00326.77
8.3.80.0060.00318.30
8.3.70.0210.00016.75
8.3.60.0170.00318.43
8.3.50.0060.00624.47
8.3.40.0070.00718.54
8.3.30.0110.00418.81
8.3.20.0080.00020.91
8.3.10.0050.00320.34
8.3.00.0000.00720.67
8.2.290.0070.00820.63
8.2.280.0110.00820.09
8.2.270.0030.00616.78
8.2.260.0070.00717.11
8.2.250.0000.00818.45
8.2.240.0030.00616.72
8.2.230.0090.00022.58
8.2.220.0090.00037.54
8.2.210.0070.00026.77
8.2.200.0100.00018.54
8.2.190.0040.01116.58
8.2.180.0060.00918.18
8.2.170.0170.00319.09
8.2.160.0070.00722.96
8.2.150.0030.00624.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00726.16
8.2.110.0060.00322.12
8.2.100.0100.00317.94
8.2.90.0000.00818.00
8.2.80.0000.00818.78
8.2.70.0060.00317.75
8.2.60.0000.00917.93
8.2.50.0050.00318.07
8.2.40.0040.00418.22
8.2.30.0020.00518.01
8.2.20.0000.00818.15
8.2.10.0000.00719.05
8.2.00.0050.00219.19
8.1.330.0110.00721.79
8.1.320.0140.00417.82
8.1.310.0150.00316.56
8.1.300.0030.00616.26
8.1.290.0000.00918.88
8.1.280.0100.00625.92
8.1.270.0080.00022.36
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0030.00720.48
8.1.230.0070.00417.83
8.1.220.0030.00617.79
8.1.210.0050.00318.77
8.1.200.0070.00417.47
8.1.190.0040.00417.25
8.1.180.0080.00019.41
8.1.170.0060.00318.71
8.1.160.0040.00418.90
8.1.150.0070.00018.88
8.1.140.0040.00420.59
8.1.130.0000.00720.05
8.1.120.0000.00717.54
8.1.110.0040.00717.41
8.1.100.0070.00017.43
8.1.90.0050.00217.37
8.1.80.0040.00417.35
8.1.70.0000.00717.45
8.1.60.0050.00317.62
8.1.50.0030.00517.43
8.1.40.0080.00017.44
8.1.30.0040.00417.55
8.1.20.0000.00817.65
8.1.10.0000.00717.53
8.1.00.0030.00517.50
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0000.00718.30
8.0.270.0080.00017.13
8.0.260.0000.00619.92
8.0.250.0030.00516.96
8.0.240.0080.00016.95
8.0.230.0030.00316.91
8.0.220.0040.00416.87
8.0.210.0030.00316.87
8.0.200.0030.00317.00
8.0.190.0000.00817.07
8.0.180.0040.00317.01
8.0.170.0040.00416.88
8.0.160.0040.00416.97
8.0.150.0000.00716.97
8.0.140.0050.00216.80
8.0.130.0000.00613.45
8.0.120.0040.00416.89
8.0.110.0000.00716.86
8.0.100.0000.00716.84
8.0.90.0000.00817.02
8.0.80.0150.00616.95
8.0.70.0050.00216.84
8.0.60.0040.00416.85
8.0.50.0080.00016.98
8.0.30.0090.00916.94
8.0.20.0090.00916.93
8.0.10.0030.00517.14
8.0.00.0130.00516.79
7.4.330.0000.00615.55
7.4.320.0000.00616.51
7.4.300.0030.00316.48
7.4.290.0030.00516.42
7.4.280.0040.00416.61
7.4.270.0040.00416.61
7.4.260.0030.00313.15
7.4.250.0000.00816.46
7.4.240.0030.00516.54
7.4.230.0070.00016.68
7.4.220.0020.00616.70
7.4.210.0030.01316.54
7.4.200.0070.00016.30
7.4.130.0180.00616.59
7.4.120.0030.02216.59
7.4.110.0070.01016.51
7.4.100.0060.01816.42
7.4.90.0060.01216.25
7.4.80.0100.00719.39
7.4.70.0100.00716.43
7.4.60.0060.01216.43
7.4.50.0030.01316.45
7.4.40.0100.01016.55
7.4.00.0110.00714.57
7.3.330.0000.00716.29
7.3.320.0050.00013.30
7.3.310.0000.00716.28
7.3.300.0070.00016.31
7.3.290.0000.00716.15
7.3.280.0080.00816.25
7.3.260.0160.00616.54
7.3.230.0130.00616.50
7.3.210.0030.01316.46
7.3.200.0140.00316.27
7.3.190.0090.00916.23
7.3.180.0100.01016.29
7.3.170.0140.00516.59
7.3.160.0130.00716.50
7.3.120.0110.01014.81
7.3.110.0060.01414.63
7.3.100.0070.01114.75
7.3.90.0050.01414.76
7.3.80.0100.00714.64
7.3.70.0090.00614.77
7.3.60.0040.01414.64
7.3.50.0030.01614.73
7.3.40.0070.01014.70
7.3.30.0090.00914.37
7.3.20.0110.00614.61
7.3.10.0140.00514.73
7.3.00.0030.01614.56
7.2.330.0070.01016.43
7.2.320.0070.01016.48
7.2.310.0070.01016.61
7.2.300.0150.00616.62
7.2.290.0090.00716.41
7.2.240.0120.00615.09
7.2.230.0120.00914.88
7.2.220.0110.00914.75
7.2.210.0090.00814.57
7.2.200.0050.01414.95
7.2.190.0100.01014.66
7.2.180.0100.00714.77
7.2.170.0060.01314.82
7.2.160.0090.00814.78
7.2.150.0050.01415.16
7.2.140.0100.01014.81
7.2.130.0090.00915.01
7.2.120.0120.00914.95
7.2.110.0120.00914.88
7.2.100.0090.01114.99
7.2.90.0090.00915.02
7.2.80.0070.01014.89
7.2.70.0080.00814.86
7.2.60.0090.01215.01
7.2.50.0050.01214.91
7.2.40.0030.01714.84
7.2.30.0120.00914.94
7.2.20.0100.01015.04
7.2.10.0170.00014.84
7.2.00.0120.01215.05
7.1.330.0120.00913.96
7.1.320.0060.01513.80
7.1.310.0110.00513.66
7.1.300.0090.00914.00
7.1.290.0120.00513.72
7.1.280.0110.00813.89
7.1.270.0150.00213.82
7.1.260.0100.01013.93
7.1.250.0090.00913.77

preferences:
168.25 ms | 403 KiB | 5 Q