3v4l.org

run code in 300+ PHP versions simultaneously
<?php $compare = function($a, $b) use(&$iteration_count) { echo("$a : $b\n"); $iteration_count++; return strcmp($a, $b); }; $a = array('a', 'b', 'c', 'n'); $b = array('m', 'x', 'y', 'z'); $iteration_count = 0; echo "array_udiff:" . json_encode(array_udiff($a, $b, $compare)) . "\n"; echo "iterations: $iteration_count\n\n"; $iteration_count = 0; echo "array_uintersect:" . json_encode(array_uintersect($a, $b, $compare)) . "\n"; echo "iterations: $iteration_count\n\n";

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.00618.30
8.3.60.0100.00718.43
8.3.50.0150.00722.18
8.3.40.0090.00618.67
8.3.30.0030.01419.05
8.3.20.0000.00720.34
8.3.10.0000.00721.91
8.3.00.0000.00719.27
8.2.190.0120.00918.29
8.2.180.0040.01118.18
8.2.170.0110.00422.96
8.2.160.0100.01020.94
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0030.00717.68
8.2.110.0060.00620.99
8.2.100.0110.00017.84
8.2.90.0040.00417.63
8.2.80.0050.00318.62
8.2.70.0000.00817.63
8.2.60.0030.00617.80
8.2.50.0040.00418.07
8.2.40.0060.00318.03
8.2.30.0080.00018.01
8.2.20.0040.00417.63
8.2.10.0000.00818.11
8.2.00.0070.00017.69
8.1.280.0070.00725.92
8.1.270.0040.00419.00
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0030.00619.14
8.1.230.0000.01020.98
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0100.00017.11
8.1.190.0000.01117.11
8.1.180.0000.00918.10
8.1.170.0030.00618.84
8.1.160.0000.00718.91
8.1.150.0040.00418.90
8.1.140.0070.00017.48
8.1.130.0000.00717.84
8.1.120.0040.00417.39
8.1.110.0070.00317.47
8.1.100.0000.00717.46
8.1.90.0040.00417.52
8.1.80.0000.00817.51
8.1.70.0050.00317.36
8.1.60.0030.00617.55
8.1.50.0040.00417.42
8.1.40.0080.00017.54
8.1.30.0040.00417.71
8.1.20.0080.00017.71
8.1.10.0040.00417.49
8.1.00.0000.00717.46
8.0.300.0080.00020.57
8.0.290.0070.00016.88
8.0.280.0030.00318.38
8.0.270.0040.00417.20
8.0.260.0050.00317.21
8.0.250.0000.00716.84
8.0.240.0040.00416.95
8.0.230.0000.00716.96
8.0.220.0000.00716.93
8.0.210.0050.00316.89
8.0.200.0030.00316.96
8.0.190.0040.00416.96
8.0.180.0030.00616.81
8.0.170.0050.00216.81
8.0.160.0030.00316.86
8.0.150.0040.00316.82
8.0.140.0050.00316.82
8.0.130.0060.00013.36
8.0.120.0020.00516.87
8.0.110.0070.00016.88
8.0.100.0000.00716.88
8.0.90.0030.00516.92
8.0.80.0150.00016.85
8.0.70.0000.00716.78
8.0.60.0040.00416.91
8.0.50.0040.00416.84
8.0.30.0130.00716.97
8.0.20.0040.01417.40
8.0.10.0030.00516.90
8.0.00.0140.00516.93
7.4.330.0000.00515.03
7.4.320.0030.00316.58
7.4.300.0040.00416.37
7.4.290.0000.00716.64
7.4.280.0040.00416.51
7.4.270.0030.00616.52
7.4.260.0070.00016.49
7.4.250.0000.00716.37
7.4.240.0020.00516.51
7.4.230.0060.00016.70
7.4.220.0030.02016.46
7.4.210.0090.00616.68
7.4.200.0030.00316.25
7.4.160.0110.00516.33
7.4.150.0080.01117.40
7.4.140.0110.01117.86
7.4.130.0130.00616.65
7.4.120.0090.00916.60
7.4.110.0070.01316.68
7.4.100.0100.01216.56
7.4.90.0040.01216.47
7.4.80.0090.01019.39
7.4.70.0110.00516.66
7.4.60.0110.01016.37
7.4.50.0130.00516.39
7.4.40.0130.01315.93
7.4.30.0190.01016.39
7.4.20.0090.01515.91
7.4.10.0080.01616.15
7.4.00.0120.00916.02
7.3.330.0050.00013.35
7.3.320.0060.00013.36
7.3.310.0030.00316.17
7.3.300.0000.00816.41
7.3.290.0070.00916.36
7.3.280.0110.00816.40
7.3.270.0070.01117.40
7.3.260.0150.00916.28
7.3.250.0130.00716.40
7.3.240.0090.00916.23
7.3.230.0130.00416.39
7.3.210.0030.01416.34
7.3.200.0080.00819.39
7.3.190.0060.01116.60
7.3.180.0110.00616.26
7.3.170.0180.00616.30
7.3.160.0220.00516.19
7.3.150.0180.00616.30
7.3.140.0140.00916.34
7.3.130.0200.00316.07
7.3.120.0130.01215.67
7.3.110.0180.00915.66
7.3.100.0180.00315.57
7.3.90.0160.00815.69
7.3.80.0160.00815.67
7.3.70.0160.00615.59
7.3.60.0180.00715.61
7.3.50.0170.00915.63
7.3.40.0180.00715.64
7.3.30.0170.00715.60
7.3.20.0180.01016.65
7.3.10.0180.00816.47
7.3.00.0160.01116.52
7.2.330.0060.01716.31
7.2.320.0110.00716.71
7.2.310.0090.01216.30
7.2.300.0260.00316.27
7.2.290.0130.01316.12
7.2.280.0130.01316.56
7.2.270.0160.00716.26
7.2.260.0150.01216.30
7.2.250.0240.01116.61
7.2.240.0180.01015.68
7.2.230.0080.01415.61
7.2.220.0180.00915.79
7.2.210.0150.00915.55
7.2.200.0200.00715.76
7.2.190.0110.01415.76
7.2.180.0190.00815.70
7.2.170.0180.01315.73
7.2.160.0150.01015.88
7.2.150.0130.01016.68
7.2.140.0130.01416.78
7.2.130.0180.00816.70
7.2.120.0290.01316.85
7.2.110.0140.01016.76
7.2.100.0180.00616.74
7.2.90.0140.01416.73
7.2.80.0190.00916.74
7.2.70.0180.00916.82
7.2.60.0100.01016.81
7.2.50.0170.01216.76
7.2.40.0200.01016.82
7.2.30.0160.00916.77
7.2.20.0150.01116.75
7.2.10.0200.00516.64
7.2.00.0090.00817.37
7.1.330.0140.00515.73
7.1.320.0190.00815.85
7.1.310.0150.00915.76
7.1.300.0160.01015.69
7.1.290.0150.01015.72
7.1.280.0080.01315.67
7.1.270.0160.00615.85
7.1.260.0190.00515.66
7.1.250.0150.01015.57
7.1.240.0290.00315.63
7.1.230.0300.00415.61
7.1.220.0220.01015.49
7.1.210.0180.01515.71
7.1.200.0190.00815.62
7.1.190.0190.01215.66
7.1.180.0300.00915.43
7.1.170.0200.01115.65
7.1.160.0290.00515.45
7.1.150.0240.01315.80
7.1.140.0330.00715.52
7.1.130.0220.00915.57
7.1.120.0190.01615.50
7.1.110.0240.00615.56
7.1.100.0120.01116.71
7.1.90.0250.01115.58
7.1.80.0210.01215.56
7.1.70.0130.00816.25
7.1.60.0320.01417.60
7.1.50.0160.01316.24
7.1.40.0260.01315.53
7.1.30.0190.00915.48
7.1.20.0140.01015.17
7.1.10.0180.01115.59
7.1.00.0150.04218.97
7.0.330.0210.01315.30
7.0.320.0210.01215.13
7.0.310.0250.01115.15
7.0.300.0280.01115.35
7.0.290.0310.01315.03
7.0.280.0230.00315.17
7.0.270.0240.00515.17
7.0.260.0270.00915.22
7.0.250.0300.00315.40
7.0.240.0250.00615.41
7.0.230.0280.00715.24
7.0.220.0170.01415.22
7.0.210.0220.00915.36
7.0.200.0150.00616.07
7.0.190.0180.01315.42
7.0.180.0260.00414.97
7.0.170.0170.01014.90
7.0.160.0100.01414.92
7.0.150.0260.00415.30
7.0.140.0090.04318.63
7.0.130.0150.01515.28
7.0.120.0230.01315.18
7.0.110.0160.02417.64
7.0.100.0120.02317.62
7.0.90.0170.03217.46
7.0.80.0140.04117.54
7.0.70.0170.02117.54
7.0.60.0180.02617.51
7.0.50.0160.02217.58
7.0.40.0080.02817.43
7.0.30.0140.02317.49
7.0.20.0120.02617.52
7.0.10.0160.02017.49
7.0.00.0080.02617.54
5.6.400.0260.01115.96
5.6.390.0230.01616.25
5.6.380.0250.01116.04
5.6.370.0290.01215.88
5.6.360.0260.01616.11
5.6.350.0210.00815.88
5.6.340.0260.01016.00
5.6.330.0270.00715.84
5.6.320.0140.02116.19
5.6.310.0260.01015.67
5.6.300.0230.01416.04
5.6.290.0210.01516.00
5.6.280.0150.04218.40
5.6.270.0340.00415.93
5.6.260.0180.04118.26
5.6.250.0180.02018.34
5.6.240.0170.04418.24
5.6.230.0070.04918.34
5.6.220.0140.02518.25
5.6.210.0130.03318.22
5.6.200.0130.02718.14
5.6.190.0160.02118.33
5.6.180.0080.03218.37
5.6.170.0150.02218.33
5.6.160.0140.02718.31
5.6.150.0140.02318.30
5.6.140.0080.03018.29
5.6.130.0100.03718.41
5.6.120.0180.02118.28
5.6.110.0140.02718.41
5.6.100.0190.01818.25
5.6.90.0080.02518.21
5.6.80.0120.02518.02
5.6.70.0100.02217.88
5.6.60.0120.02217.90
5.6.50.0150.02317.88
5.6.40.0140.02117.89
5.6.30.0130.01818.02
5.6.20.0140.02117.92
5.6.10.0100.02317.99
5.6.00.0140.02318.04
5.5.380.0220.04216.84
5.5.370.0180.03916.78
5.5.360.0140.02616.93
5.5.350.0090.03216.83
5.5.340.0110.02817.01
5.5.330.0140.02417.05
5.5.320.0140.02216.96
5.5.310.0100.03116.97
5.5.300.0110.02516.96
5.5.290.0100.02716.93
5.5.280.0140.02916.97
5.5.270.0160.02216.85
5.5.260.0140.02616.79
5.5.250.0110.03116.66
5.5.240.0110.03616.65
5.5.230.0090.02416.39
5.5.220.0140.02216.61
5.5.210.0140.02516.64
5.5.200.0140.01916.58
5.5.190.0060.03016.63
5.5.180.0120.02216.54
5.5.170.0250.00715.70
5.5.160.0100.02316.48
5.5.150.0140.02616.55
5.5.140.0140.02216.47
5.5.130.0120.02616.62
5.5.120.0220.01616.63
5.5.110.0150.02016.41
5.5.100.0120.02816.71
5.5.90.0170.01616.50
5.5.80.0130.02416.50
5.5.70.0150.04416.60
5.5.60.0130.04416.62
5.5.50.0120.03516.58
5.5.40.0140.04216.62
5.5.30.0190.03616.47
5.5.20.0160.04016.50
5.5.10.0090.04516.23
5.5.00.0100.03416.58
5.4.450.0140.02216.23
5.4.440.0120.02116.13
5.4.430.0080.02216.04
5.4.420.0100.02216.18
5.4.410.0120.01916.04
5.4.400.0150.01715.97
5.4.390.0080.02515.79
5.4.380.0080.02516.03
5.4.370.0130.01715.95
5.4.360.0110.02115.87
5.4.350.0100.01815.96
5.4.340.0140.01616.01
5.4.330.0190.00412.63
5.4.320.0070.02315.90
5.4.310.0120.01716.09
5.4.300.0070.02315.79
5.4.290.0070.02215.93
5.4.280.0100.02215.87
5.4.270.0120.01715.79
5.4.260.0090.02215.99
5.4.250.0170.01716.05
5.4.240.0120.02015.73
5.4.230.0100.02215.80
5.4.220.0080.04215.93
5.4.210.0110.03815.94
5.4.200.0140.03715.88
5.4.190.0130.04215.92
5.4.180.0120.03415.79
5.4.170.0120.02915.93
5.4.160.0090.04315.94
5.4.150.0090.02915.80
5.4.140.0090.04514.46
5.4.130.0100.04314.57
5.4.120.0080.02314.49
5.4.110.0040.02814.41
5.4.100.0190.03214.55
5.4.90.0120.03614.47
5.4.80.0070.02114.52
5.4.70.0100.01814.53
5.4.60.0040.02214.43
5.4.50.0050.02714.43
5.4.40.0030.02614.51
5.4.30.0110.02014.57
5.4.20.0110.02314.45
5.4.10.0080.02714.62
5.4.00.0050.02214.34
5.3.290.0090.02213.95
5.3.280.0110.03413.78
5.3.270.0050.03413.94
5.3.260.0100.03013.85
5.3.250.0170.03913.96
5.3.240.0110.04313.81
5.3.230.0100.02213.79
5.3.220.0130.04013.70
5.3.210.0100.03813.78
5.3.200.0100.04313.85
5.3.190.0110.04013.77
5.3.180.0070.03813.88
5.3.170.0020.02813.87
5.3.160.0070.04313.83
5.3.150.0070.02513.79
5.3.140.0080.02313.83
5.3.130.0070.02513.73
5.3.120.0060.02613.74
5.3.110.0070.02413.79
5.3.100.0090.02213.61
5.3.90.0080.02113.54
5.3.80.0070.01913.51
5.3.70.0120.01913.49
5.3.60.0060.02113.57
5.3.50.0060.02913.45
5.3.40.0050.02213.47
5.3.30.0070.01913.40
5.3.20.0090.02713.37
5.3.10.0090.03013.32
5.3.00.0050.02413.37
5.2.170.0070.01811.83
5.2.160.0090.02311.79
5.2.150.0070.03111.77
5.2.140.0040.02111.78
5.2.130.0070.03011.79
5.2.120.0060.03211.71
5.2.110.0070.01411.75
5.2.100.0080.01211.72
5.2.90.0030.02411.79
5.2.80.0050.02011.78
5.2.70.0100.02711.77
5.2.60.0020.02111.67
5.2.50.0080.01311.75
5.2.40.0020.02411.71
5.2.30.0080.02911.76
5.2.20.0070.01711.65
5.2.10.0060.01611.63
5.2.00.0030.02011.63
5.1.60.0070.02811.25
5.1.50.0070.02811.26
5.1.40.0050.02411.31
5.1.30.0050.03211.33
5.1.20.0040.03311.38
5.1.10.0110.02611.35
5.1.00.0060.01411.21
5.0.50.0030.02711.05
5.0.40.0050.02511.05
5.0.30.0050.02211.05
5.0.20.0000.01711.05
5.0.10.0040.02011.05
5.0.00.0000.02011.05
4.4.90.0020.01911.05
4.4.80.0040.01511.05
4.4.70.0060.01611.05
4.4.60.0020.01411.05
4.4.50.0020.01911.05
4.4.40.0000.01711.05
4.4.30.0020.02311.05
4.4.20.0010.01911.05
4.4.10.0020.02011.05
4.4.00.0070.02211.05
4.3.110.0000.02211.05
4.3.100.0020.01911.05
4.3.90.0050.01811.05
4.3.80.0040.03211.05
4.3.70.0040.01711.05
4.3.60.0000.01011.05
4.3.50.0020.01711.05
4.3.40.0030.02211.05
4.3.30.0020.01911.05
4.3.20.0000.01611.05
4.3.10.0050.01511.05
4.3.00.0030.01811.05

preferences:
57.99 ms | 401 KiB | 5 Q