3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lookup = [ ['a', 'ape'], ['b', 'bee'], ['a', 'ant'], ['d', 'dog'], ['b', 'bat'], ['a', 'asp'], ]; function getValueAt($lookup, $rowIndex, $columnIndex) { return $lookup[$rowIndex][$columnIndex]; } $columnIndex = 0; $values = []; for ($i = 0; $i < count($lookup); ++$i) { $values[getValueAt($lookup, $i, $columnIndex)][] = $i; } var_export($values); echo "\n"; $onlyRecurringRows = array_filter($values, fn($row) => count($row) > 1); var_export($onlyRecurringRows);

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.0090.01319.85
8.4.150.0020.00014.05
8.4.140.0140.00717.61
8.4.130.0080.00417.62
8.4.120.0120.00720.46
8.4.110.0110.00922.51
8.4.100.0110.01017.69
8.4.90.0110.00717.76
8.4.80.0070.00319.37
8.4.70.0130.00617.83
8.4.60.0110.00817.58
8.4.50.0080.00017.71
8.4.40.0160.00317.82
8.4.30.0080.00018.70
8.4.20.0060.00917.93
8.4.10.0130.00319.50
8.3.280.0120.00818.49
8.3.270.0120.00716.31
8.3.260.0120.00716.68
8.3.250.0100.01018.90
8.3.240.0140.00416.65
8.3.230.0110.00816.48
8.3.220.0040.00519.02
8.3.210.0040.00416.88
8.3.200.0080.01216.50
8.3.190.0140.00416.52
8.3.180.0100.00816.39
8.3.170.0090.00920.88
8.3.160.0140.00420.93
8.3.150.0080.01118.64
8.3.140.0060.01317.18
8.3.130.0040.00418.05
8.3.120.0060.00319.07
8.3.110.0140.00018.39
8.3.100.0030.00716.53
8.3.90.0000.00726.77
8.3.80.0040.00418.55
8.3.70.0100.01018.43
8.3.60.0100.01418.38
8.3.50.0040.01118.43
8.3.40.0100.00720.29
8.3.30.0100.00720.20
8.3.20.0000.00824.18
8.3.10.0040.00424.66
8.3.00.0170.00328.09
8.2.290.0050.00420.34
8.2.280.0100.01018.53
8.2.270.0030.01019.04
8.2.260.0100.01016.59
8.2.250.0040.00416.70
8.2.240.0060.00319.16
8.2.230.0130.00720.94
8.2.220.0000.01524.06
8.2.210.0160.00326.77
8.2.200.0060.00318.41
8.2.190.0070.01118.54
8.2.180.0110.01116.50
8.2.170.0150.00619.07
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0150.00328.09
8.2.120.0130.00628.09
8.2.110.0110.00728.09
8.2.100.0090.00928.09
8.2.90.0070.00728.09
8.2.80.0090.00328.09
8.2.70.0050.00328.09
8.2.60.0030.00628.09
8.2.50.0000.00828.09
8.2.40.0080.00028.09
8.2.30.0000.00828.09
8.2.20.0080.00028.09
8.2.10.0040.00428.09
8.2.00.0080.00028.09
8.1.330.0110.00816.60
8.1.320.0120.00716.02
8.1.310.0060.01218.38
8.1.300.0030.00620.20
8.1.290.0000.00930.84
8.1.280.0120.00325.92
8.1.270.0060.00322.08
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0050.00328.09
8.1.230.0000.00828.09
8.1.220.0000.00828.09
8.1.210.0040.00428.09
8.1.200.0050.00328.09
8.1.190.0050.00328.09
8.1.180.0030.00528.09
8.1.170.0050.00328.09
8.1.160.0000.00828.09
8.1.150.0040.00428.09
8.1.140.0040.00428.09
8.1.130.0040.00428.09
8.1.120.0030.00528.09
8.1.110.0080.00028.09
8.1.100.0040.00428.09
8.1.90.0040.00428.09
8.1.80.0040.00428.09
8.1.70.0080.00028.09
8.1.60.0000.00828.09
8.1.50.0030.00528.09
8.1.40.0050.00328.09
8.1.30.0030.00528.09
8.1.20.0080.00028.09
8.1.10.0080.00028.09
8.1.00.0050.00328.09

preferences:
71.9 ms | 403 KiB | 5 Q