3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a1 = ['a', 'b', null, 'd']; $a2 = ['a', 'b', 'c', 'd']; $filtered1 = array_diff($a1, array_filter($a1)); print_r($filtered1); $filtered2 = array_diff($a2, array_filter($a2)); print_r($filtered2);

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.4.140.0100.00917.50
8.4.130.0110.01017.75
8.4.120.0100.00820.32
8.4.110.0100.01022.30
8.4.100.0120.00917.66
8.4.90.0120.00918.68
8.4.80.0110.00917.67
8.4.70.0090.01217.57
8.4.60.0140.00718.61
8.4.50.0100.00617.50
8.4.40.0050.00318.41
8.4.30.0180.00318.44
8.4.20.0060.00319.07
8.4.10.0080.00022.33
8.3.260.0080.01116.63
8.3.250.0100.00818.84
8.3.240.0140.00616.65
8.3.230.0120.00716.23
8.3.220.0110.01017.10
8.3.210.0060.00216.63
8.3.200.0040.00516.48
8.3.190.0130.00617.10
8.3.180.0090.01016.46
8.3.170.0040.00418.97
8.3.160.0100.01016.48
8.3.150.0150.00318.70
8.3.140.0060.00316.47
8.3.130.0000.00818.29
8.3.120.0060.01218.93
8.3.110.0050.00316.47
8.3.100.0030.00616.38
8.3.90.0140.00426.77
8.3.80.0110.00019.36
8.3.70.0150.00316.58
8.3.60.0070.01016.47
8.3.50.0120.00723.58
8.3.40.0110.00718.46
8.3.30.0140.00318.72
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0000.00726.16
8.2.290.0140.00420.59
8.2.280.0090.00522.02
8.2.270.0080.00019.02
8.2.260.0040.01118.98
8.2.250.0070.01416.49
8.2.240.0080.00417.04
8.2.230.0100.00020.94
8.2.220.0050.00524.06
8.2.210.0000.00826.77
8.2.200.0070.00318.88
8.2.190.0040.01116.58
8.2.180.0070.00725.92
8.2.170.0060.01522.96
8.2.160.0030.01022.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.00026.35
8.2.110.0060.00322.17
8.2.100.0100.01017.30
8.2.90.0070.00317.63
8.2.80.0030.00618.61
8.2.70.0030.00517.50
8.2.60.0050.00319.63
8.2.50.0000.00818.07
8.2.40.0000.00818.10
8.2.30.0060.00317.97
8.2.20.0040.00417.87
8.2.10.0040.00419.11
8.2.00.0040.00419.12
8.1.330.0130.00621.63
8.1.320.0130.00615.92
8.1.310.0070.00016.48
8.1.300.0030.00619.34
8.1.290.0000.01130.84
8.1.280.0070.01425.92
8.1.270.0180.00023.78
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0000.00922.34
8.1.230.0090.00321.03
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0040.00417.11
8.1.180.0000.00818.10
8.1.170.0080.00018.57
8.1.160.0000.00718.81
8.1.150.0000.00718.74
8.1.140.0050.00218.81
8.1.130.0070.00020.13
8.1.120.0070.00017.31
8.1.110.0050.00317.32
8.1.100.0080.00017.29
8.1.90.0070.00317.27
8.1.80.0040.00417.22
8.1.70.0030.00517.26
8.1.60.0040.00417.43
8.1.50.0000.00817.45
8.1.40.0040.00417.36
8.1.30.0080.00017.52
8.1.20.0040.00417.49
8.1.10.0030.00617.45
8.1.00.0030.00617.23
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0050.00318.29
8.0.270.0000.00717.99
8.0.260.0030.00320.18
8.0.250.0000.00716.79
8.0.240.0000.00716.89
8.0.230.0070.00316.74
8.0.220.0000.00716.75
8.0.210.0000.00716.83
8.0.200.0070.00016.87
8.0.190.0000.00716.79
8.0.180.0060.00316.86
8.0.170.0050.00316.82
8.0.160.0000.00716.83
8.0.150.0000.00716.81
8.0.140.0000.00716.66
8.0.130.0000.00513.21
8.0.120.0070.00016.88
8.0.110.0000.00816.88
8.0.100.0070.00016.69
8.0.90.0090.00016.86
8.0.80.0100.00516.84
8.0.70.0040.00416.91
8.0.60.0000.00816.85
8.0.50.0030.00516.86
8.0.30.0090.00916.84
8.0.20.0090.00917.09
8.0.10.0040.00417.02
8.0.00.0070.00316.54
7.4.330.0040.00015.55
7.4.320.0030.00316.33
7.4.300.0030.00316.56
7.4.290.0040.00416.54
7.4.280.0040.00416.32
7.4.270.0000.00716.45
7.4.260.0060.00013.18
7.4.250.0050.00316.54
7.4.240.0050.00316.43
7.4.230.0000.00816.41
7.4.220.0000.00716.43
7.4.210.0110.00816.55
7.4.200.0070.00016.28
7.4.130.0060.01216.43
7.4.120.0120.01216.49
7.4.110.0030.01416.38
7.4.100.0000.01616.31
7.4.90.0070.01016.32
7.4.80.0110.01119.39
7.4.70.0030.01316.48
7.4.60.0140.00316.47
7.4.50.0110.00716.27
7.4.40.0110.00716.05
7.4.30.0090.00816.20
7.4.20.0090.01315.92
7.4.10.0140.00316.32
7.4.00.0110.01116.23
7.3.330.0070.00016.33
7.3.320.0050.00012.89
7.3.310.0000.00716.27
7.3.300.0000.00716.14
7.3.290.0050.00916.19
7.3.260.0070.01016.18
7.3.240.0110.00616.23
7.3.230.0090.00616.36
7.3.210.0070.01016.47
7.3.200.0100.01016.33
7.3.190.0090.00616.24
7.3.180.0090.00616.29
7.3.170.0040.01216.46
7.3.160.0130.00316.28
7.3.150.0030.01316.32
7.3.140.0090.01016.25
7.3.130.0040.01215.95
7.3.120.0110.00816.32
7.3.110.0070.01416.11
7.3.100.0120.00416.34
7.3.90.0000.01716.08
7.3.80.0080.00816.16
7.3.70.0090.00916.17
7.3.60.0000.02015.98
7.3.50.0110.01116.00
7.3.40.0100.01016.20
7.3.30.0130.00516.07
7.3.20.0120.00416.16
7.3.10.0060.01716.09
7.3.00.0100.00716.11
7.2.330.0060.01316.63
7.2.320.0140.01216.50
7.2.310.0150.00616.25
7.2.300.0030.01316.56
7.2.290.0100.00616.59
7.2.280.0120.01016.55
7.2.270.0120.00716.26
7.2.260.0030.01816.16
7.2.250.0110.00716.30
7.2.240.0130.01016.58
7.2.230.0000.01616.43
7.2.220.0140.00316.15
7.2.210.0100.01016.39
7.2.200.0080.00816.23
7.2.190.0150.00816.13
7.2.180.0190.00316.40
7.2.170.0160.00816.03
7.2.160.0090.01516.29
7.2.150.0080.01216.59
7.2.140.0070.01016.14
7.2.130.0070.01416.41
7.2.120.0090.00916.38
7.2.110.0100.01316.38
7.2.100.0070.01516.36
7.2.90.0160.00916.11
7.2.80.0160.00416.43
7.2.70.0030.01416.09
7.2.60.0070.01016.23
7.2.50.0180.00616.36
7.2.40.0130.00916.52
7.2.30.0040.01216.46
7.2.20.0120.01216.40
7.2.10.0060.01616.29
7.2.00.0100.01016.35

preferences:
74.12 ms | 403 KiB | 5 Q