3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'key_1' => 'FOO', 'key_2' => 'FTU-1', 'cats' => '/30/' ], [ 'key_1' => 'FOO', 'key_2' => 'FTU-2', 'cats' => '/30/' ], [ 'key_1' => 'FOO', 'key_2' => 'FTU-3', 'cats' => '/30/10/' ], [ 'key_1' => 'FOO', 'key_2' => 'FTU-4', 'cats' => '/15/' ], [ 'key_1' => 'FOO', 'key_2' => 'FTU-5', 'cats' => '/10/' ], [ 'key_1' => 'FOO', 'key_2' => 'FTU-6', 'cats' => '/15/' ], ]; $result = []; foreach ($array as $row) { foreach (explode('/', trim($row['cats'], '/')) as $cat) { $result[$cat][] = $row; } } var_export($result);

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.0050.00416.81
8.5.00.0080.01219.84
8.4.150.0020.00014.05
8.4.140.0130.00817.52
8.4.130.0120.00917.58
8.4.120.0150.01024.13
8.4.110.0130.00722.31
8.4.100.0120.00717.85
8.4.90.0100.00919.00
8.4.80.0090.00617.80
8.4.70.0030.00617.46
8.4.60.0050.00318.67
8.4.50.0110.00918.60
8.4.40.0140.00417.69
8.4.30.0080.01122.26
8.4.20.0040.00819.63
8.4.10.0170.00319.48
8.3.280.0120.00918.18
8.3.270.0140.00816.62
8.3.260.0140.00517.24
8.3.250.0140.00418.98
8.3.240.0100.01216.74
8.3.230.0150.00716.66
8.3.220.0090.00619.03
8.3.210.0130.00518.63
8.3.200.0050.00416.51
8.3.190.0130.00517.12
8.3.180.0110.00916.46
8.3.170.0030.00717.11
8.3.160.0100.00720.95
8.3.150.0070.01117.31
8.3.140.0080.00018.66
8.3.130.0110.00318.53
8.3.120.0160.00616.46
8.3.110.0180.00418.05
8.3.100.0230.00316.59
8.3.90.0250.00016.10
8.3.80.0260.00016.39
8.3.70.0210.00416.36
8.3.60.0230.00016.48
8.3.50.0170.00716.46
8.3.40.0140.00717.37
8.3.30.0200.00017.13
8.3.20.0120.00617.22
8.3.10.0140.00617.26
8.3.00.0050.01019.17
8.2.290.0090.00720.61
8.2.280.0100.00818.47
8.2.270.0140.00716.68
8.2.260.0090.00917.26
8.2.250.0230.00016.45
8.2.240.0180.00316.54
8.2.230.0130.00816.26
8.2.220.0100.01016.13
8.2.210.0150.00616.37
8.2.200.0150.00516.56
8.2.190.0130.00716.36
8.2.180.0100.01016.38
8.2.170.0150.00617.59
8.2.160.0110.01117.48
8.2.150.0170.00619.09
8.2.140.0160.00617.41
8.2.130.0220.00017.38
8.2.120.0200.00317.60
8.2.110.0100.01017.33
8.2.100.0160.00417.29
8.2.90.0130.00817.66
8.2.80.0160.00517.20
8.2.70.0150.00617.48
8.2.60.0200.00017.64
8.2.50.0190.00017.36
8.2.40.0140.00517.29
8.2.30.0110.00717.46
8.2.20.0160.00317.39
8.2.10.0110.00817.26
8.2.00.0130.00617.34
8.1.330.0100.00821.78
8.1.320.0090.00915.92
8.1.310.0000.00816.84
8.1.300.0110.00816.07
8.1.290.0210.00016.15
8.1.280.0180.00416.17
8.1.270.0190.00516.99
8.1.260.0200.00017.27
8.1.250.0190.00318.94
8.1.240.0200.00017.28
8.1.230.0120.00617.18
8.1.220.0190.00017.01
8.1.210.0050.01517.03
8.1.200.0080.01219.02
8.1.190.0140.00516.94
8.1.180.0140.00516.88
8.1.170.0130.00416.88
8.1.160.0170.00718.93
8.1.150.0200.00017.05
8.1.140.0120.00616.92
8.1.130.0110.00717.13
8.1.120.0190.00017.04
8.1.110.0150.00317.23
8.1.100.0120.00617.28
8.1.90.0100.01017.29
8.1.80.0100.01017.07
8.1.70.0170.00016.95
8.1.60.0200.00017.24
8.1.50.0150.00517.06
8.1.40.0130.00917.01
8.1.30.0180.00417.38
8.1.20.0150.00617.48
8.1.10.0210.00017.11
8.1.00.0180.00616.71

preferences:
31.58 ms | 403 KiB | 5 Q