3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urls = [ ['url' => 'https://www.example.com/', 'parent_url' => 'https://www.example.com/bleh/bleh.aspx'], ['url' => 'https://www.example2.com/', 'parent_url' => 'https://www.example2.com/blar.aspx'], 'not an array', ['url' => 'https://www.example.com/', 'parent_url' => 'https://www.example.com/bla/bla.aspx'], ]; $urls_uniq = ['https://www.example.com/', 'https://www.example.com/go/173.aspx']; var_export( array_uintersect( $urls, $urls_uniq, function($a, $b) { echo json_encode($a) . ' VS ' . json_encode($b) . "\n"; // return ($a['url'] ?? null) === $b ? 0 : 1; // this doesn't work. // return ($a['url'] ?? $a) === ($b['url'] ?? $b) ? 0 : 1; // this doesn't work return strcmp($a['url'] ?? $a, $b['url'] ?? $b); // or return ($a['url'] ?? $a) <=> ($b['url'] ?? $b); } ) );

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.0100.00818.57
8.5.00.0110.00920.11
8.4.150.0030.00014.05
8.4.140.0170.00417.83
8.4.130.0080.00118.81
8.4.120.0140.00520.37
8.4.110.0090.01020.64
8.4.100.0100.00917.73
8.4.90.0050.00320.78
8.4.80.0040.00618.82
8.4.70.0050.00320.60
8.4.60.0070.00922.52
8.4.50.0110.00719.38
8.4.40.0190.00017.65
8.4.30.0160.00320.69
8.4.20.0130.00719.46
8.4.10.0030.00619.62
8.3.280.0140.00618.43
8.3.270.0100.00916.39
8.3.260.0100.00716.63
8.3.250.0110.00718.89
8.3.240.0040.00716.50
8.3.230.0110.00916.46
8.3.220.0100.00818.81
8.3.210.0120.00418.28
8.3.200.0060.00316.53
8.3.190.0100.00916.98
8.3.180.0110.00416.63
8.3.170.0070.01118.91
8.3.160.0090.00918.57
8.3.150.0060.01220.88
8.3.140.0110.00416.63
8.3.130.0120.00618.50
8.3.120.0080.00018.79
8.3.110.0030.00620.94
8.3.100.0000.00824.06
8.3.90.0090.00026.77
8.3.80.0070.00418.22
8.3.70.0120.00316.63
8.3.60.0090.00616.50
8.3.50.0000.01520.18
8.3.40.0110.00320.04
8.3.30.0120.00318.70
8.3.20.0000.00724.18
8.3.10.0040.01124.66
8.3.00.0040.00426.16
8.2.290.0090.00817.43
8.2.280.0080.01218.54
8.2.270.0070.01117.22
8.2.260.0050.00318.66
8.2.250.0080.00016.72
8.2.240.0070.01118.77
8.2.230.0100.00622.58
8.2.220.0090.00037.54
8.2.210.0110.00426.77
8.2.200.0040.00416.75
8.2.190.0000.02016.58
8.2.180.0080.01125.92
8.2.170.0100.01318.91
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.63
8.2.110.0030.00620.92
8.2.100.0100.00317.83
8.2.90.0000.00918.16
8.2.80.0030.00719.28
8.2.70.0050.00317.50
8.2.60.0090.00017.93
8.2.50.0100.00018.07
8.2.40.0000.00718.34
8.2.30.0070.00018.14
8.2.20.0080.00020.51
8.2.10.0040.00417.79
8.2.00.0030.00519.33
8.1.330.0120.00716.34
8.1.320.0110.00818.14
8.1.310.0120.00618.50
8.1.300.0080.00817.96
8.1.290.0060.00318.88
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00317.84
8.1.230.0060.00620.93
8.1.220.0040.00417.74
8.1.210.0040.00418.96
8.1.200.0060.00317.23
8.1.190.0090.00017.22
8.1.180.0060.00318.10
8.1.170.0030.00618.48
8.1.160.0040.00418.96
8.1.150.0000.00718.71
8.1.140.0040.00417.52
8.1.130.0050.00318.88
8.1.120.0000.00917.46
8.1.110.0000.00817.50
8.1.100.0050.00317.45
8.1.90.0050.00317.46
8.1.80.0000.00717.52
8.1.70.0000.00717.47
8.1.60.0050.00317.50
8.1.50.0080.00017.45
8.1.40.0030.00617.55
8.1.30.0030.00617.61
8.1.20.0160.00717.52
8.1.10.0120.00817.58
8.1.00.0240.00217.56
8.0.300.0070.00020.01
8.0.290.0000.00716.63
8.0.280.0070.00018.36
8.0.270.0030.00316.71
8.0.260.0030.00318.46
8.0.250.0040.00416.87
8.0.240.0030.00316.96
8.0.230.0030.00316.99
8.0.220.0030.00316.96
8.0.210.0000.00716.87
8.0.200.0060.00316.97
8.0.190.0050.00316.97
8.0.180.0040.00316.95
8.0.170.0030.00616.92
8.0.160.0050.00316.97
8.0.150.0080.00416.72
8.0.140.0180.00416.71
8.0.130.0150.00416.82
8.0.120.0170.00316.84
8.0.110.0090.00516.86
8.0.100.0130.00416.79
8.0.90.0200.00316.83
8.0.80.0180.00416.92
8.0.70.0120.00616.86
8.0.60.0100.00616.77
8.0.50.0110.00316.86
8.0.30.0110.00416.78
8.0.20.0080.00816.95
8.0.10.0050.00717.04
7.4.330.0000.00515.55
7.4.320.0000.00716.66
7.4.300.0030.00316.54
7.4.290.0030.00316.49
7.4.280.0030.00616.44
7.4.270.0080.00016.62
7.4.260.0140.00316.40
7.4.250.0170.00716.57
7.4.240.0180.00316.62
7.4.230.0200.00316.53
7.4.220.0220.00016.41
7.4.210.0180.00316.45
7.4.200.0100.01016.45
7.4.190.0180.00016.64
7.4.180.0180.00316.46
7.4.160.0100.01016.60
7.4.150.0130.00416.50
7.4.140.0130.00416.43
7.4.130.0150.00516.44
7.4.120.0140.00316.43
7.4.110.0150.00516.54
7.4.100.0120.00816.49
7.4.90.0170.00316.50
7.4.80.0100.00216.42
7.4.70.0120.00816.36
7.4.60.0150.00416.41
7.4.50.0160.00616.35
7.4.40.0150.00716.51
7.4.30.0160.00416.35
7.4.20.0110.00916.50
7.4.10.0090.00616.55
7.4.00.0070.00716.56

preferences:
36.19 ms | 403 KiB | 5 Q