3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = [4, 3, 4, 3, 1, 2, 1]; var_export( array_keys( array_intersect( array_count_values($numbers), [1] ) ) ); echo "\n---\n"; var_export( array_keys( array_filter( array_count_values($numbers), function($count) { return $count === 1; } ) ) ); echo "\n---\n"; // PHP7.4+ var_export( array_keys( array_filter( array_count_values($numbers), fn($count) => $count === 1 ) ) );

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.0090.00816.73
8.5.00.0110.01120.13
8.4.150.0030.00014.05
8.4.140.0130.00817.56
8.4.130.0070.00217.97
8.4.120.0130.00820.51
8.4.110.0120.00722.36
8.4.100.0130.00717.77
8.4.90.0050.00518.52
8.4.80.0030.00517.65
8.4.70.0170.00217.77
8.4.60.0100.00818.71
8.4.50.0100.01218.57
8.4.40.0030.00917.76
8.4.30.0060.01520.41
8.4.20.0090.00918.94
8.4.10.0040.00717.61
8.3.280.0110.00818.33
8.3.270.0070.01216.79
8.3.260.0110.00816.61
8.3.250.0120.00618.86
8.3.240.0110.00816.77
8.3.230.0120.00716.73
8.3.220.0100.00917.09
8.3.210.0080.00818.39
8.3.200.0080.00716.73
8.3.190.0090.00916.78
8.3.180.0080.00718.44
8.3.170.0120.00619.14
8.3.160.0030.00718.31
8.3.150.0150.00319.04
8.3.140.0040.00418.82
8.3.130.0080.00018.61
8.3.120.0090.00020.59
8.3.110.0040.00818.39
8.3.100.0030.00616.44
8.3.90.0110.00416.48
8.3.80.0170.00926.55
8.3.70.0060.00918.18
8.3.60.0140.00718.43
8.3.50.0090.00818.31
8.3.40.0090.00618.51
8.3.30.0150.00418.76
8.3.20.0040.00421.86
8.3.10.0050.00319.96
8.3.00.0050.00322.39
8.2.290.0080.00420.55
8.2.280.0100.00618.48
8.2.270.0090.00919.03
8.2.260.0030.00616.84
8.2.250.0090.00016.82
8.2.240.0030.00617.03
8.2.230.0100.00620.94
8.2.220.0070.00724.06
8.2.210.0150.00326.77
8.2.200.0030.00618.42
8.2.190.0100.01016.58
8.2.180.0070.01118.04
8.2.170.0100.01022.96
8.2.160.0120.00319.33
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.83
8.2.110.0070.00320.39
8.2.100.0100.00017.91
8.2.90.0030.00620.58
8.2.80.0040.00417.97
8.2.70.0040.00417.93
8.2.60.0090.00018.16
8.2.50.0040.00418.10
8.2.40.0040.00420.97
8.2.30.0050.00319.39
8.2.20.0080.00018.00
8.2.10.0040.00419.33
8.2.00.0070.00019.23
8.1.330.0130.00522.07
8.1.320.0120.00716.43
8.1.310.0030.01018.33
8.1.300.0050.00320.21
8.1.290.0050.00518.88
8.1.280.0040.01125.92
8.1.270.0070.01023.68
8.1.260.0080.00026.35
8.1.250.0140.00328.09
8.1.240.0030.00623.95
8.1.230.0080.00420.91
8.1.220.0080.00017.76
8.1.210.0040.00419.16
8.1.200.0030.00617.35
8.1.190.0030.00617.23
8.1.180.0030.00618.10
8.1.170.0050.00320.61
8.1.160.0040.00418.98
8.1.150.0040.00418.92
8.1.140.0000.00720.84
8.1.130.0030.00317.41
8.1.120.0000.00717.53
8.1.110.0080.00017.48
8.1.100.0030.00617.40
8.1.90.0040.00417.38
8.1.80.0000.00817.48
8.1.70.0030.00317.41
8.1.60.0040.00417.66
8.1.50.0050.00317.47
8.1.40.0060.00317.50
8.1.30.0040.00417.60
8.1.20.0050.00517.68
8.1.10.0030.00617.55
8.1.00.0030.00617.47
8.0.300.0040.00419.98
8.0.290.0080.00016.63
8.0.280.0000.00718.38
8.0.270.0030.00317.23
8.0.260.0000.00716.84
8.0.250.0030.00316.89
8.0.240.0030.00316.89
8.0.230.0030.00316.80
8.0.220.0030.00316.84
8.0.210.0040.00416.81
8.0.200.0070.00016.99
8.0.190.0070.00016.91
8.0.180.0030.00516.92
8.0.170.0000.00916.96
8.0.160.0050.00216.98
8.0.150.0070.00016.92
8.0.140.0000.00716.88
8.0.130.0050.00013.38
8.0.120.0000.00716.90
8.0.110.0050.00316.85
8.0.100.0040.00416.86
8.0.90.0040.00416.94
8.0.80.0040.01816.89
8.0.70.0000.00716.88
8.0.60.0050.00216.78
8.0.50.0000.00816.89
8.0.30.0110.00716.88
8.0.20.0100.00817.20
8.0.10.0080.00817.03
8.0.00.0070.01216.81
7.4.330.0020.00215.55
7.4.320.0030.00316.57
7.4.300.0000.00616.59
7.4.290.0040.00416.54
7.4.280.0040.00416.52
7.4.270.0000.00716.48
7.4.260.0000.00613.20
7.4.250.0000.00716.58
7.4.240.0030.00416.49
7.4.230.0070.00016.61
7.4.220.0020.00516.53
7.4.210.0120.00416.58
7.4.200.0030.00316.62
7.4.160.0090.00616.56
7.4.150.0090.00616.73
7.4.140.0090.01017.19
7.4.130.0070.01216.43
7.4.120.0070.01116.46
7.4.110.0020.01416.50
7.4.100.0070.01216.42
7.4.90.0100.00616.53
7.4.80.0060.01117.90
7.4.70.0120.00716.47
7.4.60.0100.01016.42
7.4.50.0050.01016.37
7.4.40.0080.01116.46
7.4.30.0030.01316.46
7.4.20.0120.00316.58
7.4.10.0090.00616.70
7.4.00.0060.01216.53
7.3.330.0070.00016.21
7.3.320.0000.00613.21
7.3.310.0000.00715.94
7.3.300.0000.00716.02
7.3.290.0030.00316.16
7.3.280.0000.01516.27
7.3.270.0000.01416.21
7.3.260.0130.00816.28
7.3.250.0040.01016.20
7.3.240.0090.00716.15
7.3.230.0070.01016.14
7.3.220.0060.00916.15
7.3.210.0080.01016.15
7.3.200.0090.00916.18
7.3.190.0120.00316.29
7.3.180.0100.01016.24
7.3.170.0050.01316.20
7.3.160.0090.00716.26
7.3.150.0120.00316.05
7.3.140.0090.00916.13
7.3.130.0090.01216.14
7.3.120.0060.01016.16
7.3.110.0120.00416.07
7.3.100.0030.01716.04
7.3.90.0090.00915.48
7.3.80.0090.00715.40
7.3.70.0050.01315.31
7.3.60.0070.00715.49
7.3.50.0030.01115.41
7.3.40.0060.01015.43
7.3.30.0070.00915.37
7.3.20.0080.00815.53
7.3.10.0070.01115.51
7.3.00.0120.00515.52
7.2.340.0210.00516.09
7.2.330.0120.01116.34
7.2.320.0120.00916.16
7.2.310.0150.00916.25
7.2.300.0140.00816.13
7.2.290.0110.01116.19
7.2.280.0240.00516.11
7.2.270.0150.01516.16
7.2.260.0340.00016.13
7.2.250.0160.01116.06
7.2.240.0150.01516.16
7.2.230.0180.01116.14
7.2.220.0140.01215.34
7.2.210.0130.00915.24
7.2.200.0180.00815.55
7.2.190.0140.00915.37
7.2.180.0300.00515.38
7.2.170.0150.00915.63
7.2.160.0140.00715.60
7.2.150.0130.00915.46
7.2.140.0160.00815.65
7.2.130.0130.00915.69
7.2.120.0130.01015.67
7.2.110.0160.00715.63
7.2.100.0110.01415.72
7.2.90.0140.00915.49
7.2.80.0100.01415.57
7.2.70.0180.01015.55
7.2.60.0140.00815.74
7.2.50.0090.01315.54
7.2.40.0120.01015.60
7.2.30.0120.00915.66
7.2.20.0120.01115.71
7.2.10.0160.00815.61
7.2.00.0200.00615.71
7.1.330.0150.01115.29
7.1.320.0220.00614.39
7.1.310.0150.01014.49
7.1.300.0140.00914.58
7.1.290.0290.00814.43
7.1.280.0090.01214.54
7.1.270.0880.00314.45
7.1.260.0160.00614.34
7.1.250.0130.00914.45
7.1.240.0200.01015.21
7.1.230.0190.01015.35
7.1.220.0220.00515.30
7.1.210.0260.00615.24
7.1.200.0240.00615.32
7.1.190.0210.00415.33
7.1.180.0380.00815.25
7.1.170.0120.01215.13
7.1.160.0150.00915.15
7.1.150.0140.01415.20
7.1.140.0200.00615.27
7.1.130.0100.01715.23
7.1.120.0110.01415.23
7.1.110.0190.01115.20
7.1.100.0090.01315.20
7.1.90.0150.01215.16
7.1.80.0220.00415.13
7.1.70.0210.00615.10
7.1.60.0170.01415.27
7.1.50.0200.00715.27
7.1.40.0300.00015.11
7.1.30.0190.00815.12
7.1.20.0150.01015.21
7.1.10.0230.00515.20
7.1.00.0190.00815.09

preferences:
43.2 ms | 403 KiB | 5 Q