3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_array_filter(array $array, ?callable $callback = null) { $callback ??= static fn(mixed $item) => (bool) $item; $filtered = []; foreach ($array as $item) { $callback($item) and $filtered[] = $item; } return $filtered; }

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.00.0060.00319.87
8.4.150.0030.00014.05
8.4.140.0110.01117.41
8.4.130.0100.00817.77
8.4.120.0070.00224.10
8.4.110.0130.00822.41
8.4.100.0150.00618.49
8.4.90.0030.00619.07
8.4.80.0120.00818.46
8.4.70.0040.00518.11
8.4.60.0130.00718.69
8.4.50.0090.00820.46
8.4.40.0120.00617.57
8.4.30.0060.00320.57
8.4.20.0090.00020.78
8.4.10.0000.00819.41
8.3.280.0110.00918.30
8.3.270.0120.00716.48
8.3.260.0050.00316.48
8.3.250.0110.00718.93
8.3.240.0130.00617.11
8.3.230.0070.00116.68
8.3.220.0050.00319.04
8.3.210.0030.00518.51
8.3.200.0040.00516.39
8.3.190.0100.01016.91
8.3.180.0110.00718.80
8.3.170.0060.01216.97
8.3.160.0120.00618.09
8.3.150.0000.00816.95
8.3.140.0060.00316.42
8.3.130.0270.01016.34
8.3.120.0260.00316.35
8.3.110.0250.00716.50
8.3.100.0230.01016.18
8.3.90.0310.00716.18
8.3.80.0290.00916.18
8.3.70.0250.00316.56
8.3.60.0270.00316.18
8.3.50.0210.00316.42
8.3.40.0100.01017.30
8.3.30.0150.00217.21
8.3.20.0170.00617.20
8.3.10.0170.00317.10
8.3.00.0040.00916.91
8.2.290.0110.00820.15
8.2.280.0070.00218.18
8.2.270.0120.00916.45
8.2.260.0040.00416.93
8.2.250.0190.00016.33
8.2.240.0210.00016.35
8.2.230.0190.00816.37
8.2.220.0240.00316.18
8.2.210.0230.01116.26
8.2.200.0160.01316.39
8.2.190.0200.01216.31
8.2.180.0260.00316.45
8.2.170.0290.00017.49
8.2.160.0200.00017.64
8.2.150.0120.00617.45
8.2.140.0130.00817.43
8.2.130.0220.00017.19
8.2.120.0130.00517.41
8.2.110.0180.00317.42
8.2.100.0210.00017.35
8.2.90.0120.00917.53
8.2.80.0230.00017.50
8.2.70.0210.01416.89
8.2.60.0260.01417.30
8.2.50.0210.00917.35
8.2.40.0110.00617.40
8.2.30.0240.00317.20
8.2.20.0170.00417.44
8.2.10.0260.00417.45
8.2.00.0260.00417.10
8.1.330.0130.00721.77
8.1.320.0070.00816.04
8.1.310.0110.00716.54
8.1.300.0270.00716.18
8.1.290.0320.00416.18
8.1.280.0220.00416.18
8.1.270.0260.01316.95
8.1.260.0210.00717.45
8.1.250.0310.00317.00
8.1.240.0230.00017.18
8.1.230.0250.00416.99
8.1.220.0280.00817.13
8.1.210.0260.00316.99
8.1.200.0260.00416.75
8.1.190.0240.00816.72
8.1.180.0190.00316.96
8.1.170.0260.00717.06
8.1.160.0320.00517.16
8.1.150.0220.01517.02
8.1.140.0260.00717.00
8.1.130.0340.00717.01
8.1.120.0140.00717.29
8.1.110.0300.00416.92
8.1.100.0250.00917.08
8.1.90.0190.00617.11
8.1.80.0270.00617.02
8.1.70.0280.00717.30
8.1.60.0330.00417.28
8.1.50.0210.00317.19
8.1.40.0220.00417.40
8.1.30.0250.00417.30
8.1.20.0360.00017.37
8.1.10.0210.01817.16
8.1.00.0320.00616.96

preferences:
73.19 ms | 403 KiB | 5 Q