3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array1 = [1, 2, 3]; $array2 = [4, 5, 6]; function udiffCompare($a, $b) { echo "Compare $a and $b\n"; } var_export( array_udiff($array1, $array2, 'udiffCompare') ); echo "\n---\n"; function udiffCompare2($a, $b) { echo "Compare $a and $b\n"; return $a <=> $b; } var_export( array_udiff($array1, $array2, 'udiffCompare2') );

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.30.0070.01019.62
8.5.20.0090.00820.15
8.5.10.0070.01116.62
8.5.00.0130.01020.21
8.4.180.0150.00819.56
8.4.170.0140.00723.57
8.4.160.0150.00823.81
8.4.150.0090.00616.80
8.4.140.0130.00817.57
8.4.130.0070.00317.73
8.4.120.0120.00722.36
8.4.110.0040.00518.93
8.4.100.0120.00917.55
8.4.90.0060.00320.68
8.4.80.0090.01122.66
8.4.70.0050.00318.88
8.4.60.0120.00920.52
8.4.50.0110.01120.17
8.4.40.0160.00318.82
8.4.30.0060.01220.62
8.4.20.0110.01121.14
8.4.10.0090.00019.50
8.3.300.0110.00920.73
8.3.290.0100.01022.47
8.3.280.0050.00716.16
8.3.270.0080.01116.41
8.3.260.0100.00816.67
8.3.250.0080.00618.73
8.3.240.0080.01116.80
8.3.230.0120.00716.61
8.3.220.0070.00119.11
8.3.210.0120.00616.66
8.3.200.0040.00516.63
8.3.190.0060.00217.13
8.3.180.0110.00818.73
8.3.170.0070.01017.29
8.3.160.0110.00718.49
8.3.150.0060.01317.09
8.3.140.0100.01016.54
8.3.130.0380.00316.42
8.3.120.0300.01116.47
8.3.110.0470.01116.18
8.3.100.0460.00316.59
8.3.90.0280.01716.47
8.3.80.0380.00716.29
8.3.70.0350.01216.68
8.3.60.0390.00616.54
8.3.50.0340.01016.38
8.3.40.0330.00617.36
8.3.30.0330.00317.27
8.3.20.0270.01217.40
8.3.10.0290.01417.27
8.3.00.0090.01717.11
8.2.300.0120.00818.11
8.2.290.0110.00818.86
8.2.280.0120.00320.05
8.2.270.0110.00716.43
8.2.260.0090.00917.02
8.2.250.0320.00316.25
8.2.240.0270.01016.18
8.2.230.0330.00716.27
8.2.220.0220.01616.35
8.2.210.0310.00816.20
8.2.200.0330.00416.63
8.2.190.0320.00416.55
8.2.180.0300.00716.18
8.2.170.0350.01017.70
8.2.160.0340.00717.51
8.2.150.0300.01017.41
8.2.140.0400.00017.54
8.2.130.0300.00717.41
8.2.120.0320.00017.41
8.2.110.0330.00017.50
8.2.100.0270.01317.43
8.2.90.0360.01217.64
8.2.80.0360.00317.47
8.2.70.0320.00617.56
8.2.60.0320.00317.49
8.2.50.0320.00617.46
8.2.40.0200.01317.70
8.2.30.0230.00917.40
8.2.20.0180.01817.39
8.2.10.0310.00617.59
8.2.00.0240.01417.28
8.1.340.0120.00917.50
8.1.330.0050.00515.77
8.1.320.0140.00715.90
8.1.310.0000.00816.61
8.1.300.0380.00316.18
8.1.290.0260.01116.18
8.1.280.0250.00616.18
8.1.270.0180.00017.34
8.1.260.0240.00317.66
8.1.250.0340.00917.19
8.1.240.0280.01417.26
8.1.230.0170.01717.23
8.1.220.0320.00417.27
8.1.210.0350.00017.39
8.1.200.0250.01117.16
8.1.190.0290.00317.34
8.1.180.0290.00617.32
8.1.170.0330.00317.28
8.1.160.0290.00617.30
8.1.150.0280.00717.28
8.1.140.0260.01017.06
8.1.130.0260.01017.04
8.1.120.0210.01517.11
8.1.110.0380.00917.04
8.1.100.0200.00717.29
8.1.90.0190.00017.23
8.1.80.0160.00317.16
8.1.70.0190.00216.99
8.1.60.0260.00917.24
8.1.50.0190.00017.17
8.1.40.0100.01017.09
8.1.30.0130.00717.29
8.1.20.0130.00517.39
8.1.10.0190.00017.39
8.1.00.0190.00016.68

preferences:
43.74 ms | 1009 KiB | 5 Q