3v4l.org

run code in 300+ PHP versions simultaneously
<?php class OnlyPendingDeletion extends FilterIterator { public function __construct(array $items) { parent::__construct(new ArrayIterator($items)); } public function accept() { $item = $this->current(); $fourthOfJan = strtotime('2014-01-04'); return $fourthOfJan > strtotime($item['date']); } } $array = array( array('id' => 1, 'date' > '2014-01-01'), array('id' => 2, 'date' > '2014-01-02'), array('id' => 3, 'date' > '2014-01-03'), array('id' => 4, 'date' > '2014-01-04'), array('id' => 5, 'date' > '2014-01-05'), array('id' => 6, 'date' > '2014-01-06'), array('id' => 7, 'date' > '2014-01-07'), ); $items = new OnlyPendingDeletion($items); echo 'Pending: ', count($items), PHP_EOL; foreach ($items as $item) { echo 'id: ', $item['id'], PHP_EOL; }

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.3.60.0140.00718.43
8.3.50.0130.00821.02
8.3.40.0060.01518.79
8.3.30.0070.00719.04
8.3.20.0060.00320.21
8.3.10.0000.00822.14
8.3.00.0020.00522.45
8.2.180.0120.00318.40
8.2.170.0070.00722.96
8.2.160.0040.01119.20
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0050.00319.23
8.2.110.0040.00720.41
8.2.100.0060.00617.72
8.2.90.0000.00819.17
8.2.80.0050.00318.04
8.2.70.0030.00617.63
8.2.60.0030.00617.93
8.2.50.0060.00318.07
8.2.40.0050.00317.97
8.2.30.0040.00418.02
8.2.20.0080.00017.68
8.2.10.0050.00217.64
8.2.00.0070.00317.71
8.1.280.0110.00325.92
8.1.270.0080.00022.25
8.1.260.0040.00426.35
8.1.250.0120.00428.09
8.1.240.0030.00622.29
8.1.230.0040.01120.95
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0000.00917.23
8.1.190.0080.00017.41
8.1.180.0040.00418.74
8.1.170.0000.00818.52
8.1.160.0070.00022.16
8.1.150.0050.00218.50
8.1.140.0050.00217.31
8.1.130.0040.00417.85
8.1.120.0030.00417.46
8.1.110.0030.00817.38
8.1.100.0000.00817.42
8.1.90.0000.00817.27
8.1.80.0000.00717.40
8.1.70.0000.00717.24
8.1.60.0030.00617.50
8.1.50.0030.00517.50
8.1.40.0080.00017.42
8.1.30.0030.00617.61
8.1.20.0000.00817.54
8.1.10.0030.00517.55
8.1.00.0080.00017.56
8.0.300.0040.00418.77
8.0.290.0000.00716.93
8.0.280.0030.00318.42
8.0.270.0030.00317.24
8.0.260.0030.00316.75
8.0.250.0070.00016.91
8.0.240.0030.00516.98
8.0.230.0070.00016.96
8.0.220.0070.00016.79
8.0.210.0030.00316.82
8.0.200.0040.00416.99
8.0.190.0000.00816.83
8.0.180.0030.00616.79
8.0.170.0070.00016.99
8.0.160.0000.00816.89
8.0.150.0000.00716.77
8.0.140.0070.00316.95
8.0.130.0060.00013.38
8.0.120.0000.00816.83
8.0.110.0000.00716.90
8.0.100.0040.00416.88
8.0.90.0030.00316.86
8.0.80.0100.00716.89
8.0.70.0070.00016.95
8.0.60.0040.00416.86
8.0.50.0040.00416.97
8.0.30.0110.00817.24
8.0.20.0110.01017.40
8.0.10.0040.00417.07
8.0.00.0100.01116.65
7.4.330.0000.00515.00
7.4.320.0000.00616.57
7.4.300.0060.00016.54
7.4.290.0000.00716.54
7.4.280.0000.00716.52
7.4.270.0030.00316.58
7.4.260.0040.00416.58
7.4.250.0080.00016.59
7.4.240.0020.00616.61
7.4.230.0030.00316.32
7.4.220.0140.00616.69
7.4.210.0060.01116.60
7.4.200.0000.00716.55
7.4.190.0000.00716.42
7.4.160.0040.01216.38
7.4.150.0140.00317.40
7.4.140.0130.01017.86
7.4.130.0050.01316.47
7.4.120.0120.00616.72
7.4.110.0120.00616.57
7.4.100.0070.01016.36
7.4.90.0090.01216.63
7.4.80.0130.01019.39
7.4.70.0040.01416.50
7.4.60.0130.00316.46
7.4.50.0040.00416.31
7.4.40.0080.00622.77
7.4.30.0100.01316.52
7.4.00.0060.00814.80
7.3.330.0060.00013.16
7.3.320.0050.00013.30
7.3.310.0000.00716.37
7.3.300.0030.00316.42
7.3.290.0080.00816.45
7.3.280.0030.01316.35
7.3.270.0130.00317.40
7.3.260.0070.01016.32
7.3.250.0100.00716.43
7.3.240.0070.01016.57
7.3.230.0070.01316.39
7.3.210.0110.00516.48
7.3.200.0120.01219.39
7.3.190.0070.01116.48
7.3.180.0030.01316.47
7.3.170.0110.00816.41
7.3.160.0070.01316.22
7.3.120.0070.01114.66
7.3.110.0080.00814.79
7.3.100.0000.01014.84
7.3.90.0040.01114.87
7.3.80.0040.01114.87
7.3.70.0030.01014.84
7.3.60.0000.00914.73
7.3.50.0030.00914.85
7.3.40.0090.00314.82
7.3.30.0030.01314.65
7.3.20.0040.00816.64
7.3.10.0040.00816.60
7.3.00.0060.00616.64
7.2.330.0090.00916.48
7.2.320.0070.01416.48
7.2.310.0110.00516.38
7.2.300.0090.00916.54
7.2.290.0080.00816.63
7.2.250.0070.01014.83
7.2.240.0070.00715.04
7.2.230.0040.01415.08
7.2.220.0040.00814.88
7.2.210.0070.01014.86
7.2.200.0080.00814.85
7.2.190.0060.00914.71
7.2.180.0130.00314.96
7.2.170.0000.01814.96
7.2.80.0000.01216.42
7.2.60.0070.00416.89
7.2.00.0060.00619.36
7.1.330.0040.01115.70
7.1.320.0030.01015.66
7.1.310.0030.01015.73
7.1.300.0110.00415.33
7.1.290.0060.00815.70
7.1.280.0080.00815.81
7.1.270.0090.00015.77
7.1.260.0030.00715.77
7.1.200.0090.00315.68
7.1.100.0040.00418.08
7.1.70.0050.00917.23
7.1.60.0070.01819.82
7.1.50.0070.01716.90
7.1.00.0030.03322.48
7.0.200.0050.00516.76
7.0.140.0070.07022.12
7.0.60.0070.03720.04
7.0.50.0030.04717.90
7.0.40.0070.08320.11
7.0.30.0330.04320.12
7.0.20.0230.06720.06
7.0.10.0030.05720.24
7.0.00.0000.08720.08
5.6.280.0070.06721.12
5.6.210.0130.07720.55
5.6.200.0100.03718.16
5.6.190.0030.09320.52
5.6.180.0300.07020.68
5.6.170.0130.04320.66
5.6.160.0100.07720.68
5.6.150.0070.07718.23
5.6.140.0070.06018.28
5.6.130.0100.03718.11
5.6.120.0070.08320.97
5.6.110.0130.07021.14
5.6.100.0030.07720.86
5.6.90.0030.06021.13
5.6.80.0070.08020.33
5.5.350.0130.04720.41
5.5.340.0000.05317.96
5.5.330.0070.03720.35
5.5.320.0230.03720.36
5.5.310.0370.04320.36
5.5.300.0030.05018.04
5.5.290.0030.04717.97
5.5.280.0170.07320.69
5.5.270.0070.03720.87
5.5.260.0100.08320.65
5.5.250.0130.05720.55
5.5.240.0070.07320.29
5.4.450.0130.07319.52
5.4.440.0030.07319.41
5.4.430.0070.05319.32
5.4.420.0000.07319.56
5.4.410.0100.08019.42
5.4.400.0000.05719.24
5.4.390.0030.05019.13
5.4.380.0070.05018.87
5.4.370.0030.07718.98
5.4.360.0070.07319.22
5.4.350.0030.07319.00
5.4.340.0030.04019.16
5.4.320.0030.03718.96
5.4.310.0000.06019.25
5.4.300.0000.07719.21
5.4.290.0030.05319.17
5.4.280.0030.07719.19
5.4.270.0030.07319.08
5.4.260.0100.06719.06
5.4.250.0030.07319.08
5.4.240.0000.05019.07
5.4.230.0000.05019.21
5.4.220.0030.08019.23
5.4.210.0070.06019.31
5.4.200.0070.06019.28
5.4.190.0070.07018.93
5.4.180.0100.07319.21
5.4.170.0070.06018.94
5.4.160.0000.07719.11
5.4.150.0070.05019.17
5.4.140.0030.07016.32
5.4.130.0030.05316.51
5.4.120.0070.07016.67
5.4.110.0030.07316.29
5.4.100.0200.03716.20
5.4.90.0030.06716.55
5.4.80.0030.03716.44
5.4.70.0070.04716.54
5.4.60.0100.05016.17
5.4.50.0000.07316.44
5.4.40.0000.08016.38
5.4.30.0000.05716.37
5.4.20.0170.04716.43
5.4.10.0000.07316.24
5.4.00.0030.07015.76
5.3.290.0000.06714.75
5.3.280.0000.07714.74
5.3.270.0130.06714.74
5.3.260.0030.07014.74
5.3.250.0170.04314.74
5.3.240.0070.05314.74
5.3.230.0030.05014.74
5.3.220.0000.06014.74
5.3.210.0070.07714.74
5.3.200.0070.07014.74
5.3.190.0000.04714.74
5.3.180.0000.05314.74
5.3.170.0000.04014.74
5.3.160.0230.05314.74
5.3.150.0030.05714.74
5.3.140.0070.07314.79
5.3.130.0030.07014.74
5.3.120.0100.07014.74
5.3.110.0030.07714.74
5.3.100.0030.07014.74
5.3.90.0030.07714.74
5.3.80.0030.07014.74
5.3.70.0070.05314.74
5.3.60.0070.03314.74
5.3.50.0070.04314.74
5.3.40.0000.03714.74
5.3.30.0070.06714.74
5.3.20.0030.07314.74
5.3.10.0070.04314.74
5.3.00.0000.03714.74
5.2.170.0030.06014.74
5.2.160.0000.03014.74
5.2.150.0000.03314.74
5.2.140.0000.06714.74
5.2.130.0200.03314.74
5.2.120.0130.05014.74
5.2.110.0030.03314.74
5.2.100.0000.03014.74
5.2.90.0030.05714.74
5.2.80.0000.06314.74
5.2.70.0070.04314.74
5.2.60.0070.05314.74
5.2.50.0030.05314.74
5.2.40.0000.03714.74
5.2.30.0070.03014.74
5.2.20.0030.03014.74
5.2.10.0070.05014.74
5.2.00.0030.05014.74
5.1.60.0000.03314.74
5.1.50.0000.02314.74
5.1.40.0000.02314.74
5.1.30.0070.02314.74
5.1.20.0000.02714.74
5.1.10.0000.02314.74
5.1.00.0030.02314.74
5.0.50.0000.02014.74
5.0.40.0030.01714.74
5.0.30.0000.03314.74
5.0.20.0030.01714.74
5.0.10.0000.02014.74
5.0.00.0000.03014.74
4.4.90.0030.03014.74
4.4.80.0000.03714.74
4.4.70.0030.03314.74
4.4.60.0000.03014.74
4.4.50.0030.03014.74
4.4.40.0000.02714.74
4.4.30.0000.01314.74
4.4.20.0000.01714.74
4.4.10.0000.01714.74
4.4.00.0000.02314.74
4.3.110.0000.01314.74
4.3.100.0030.01314.74
4.3.90.0000.01314.74
4.3.80.0000.02314.74
4.3.70.0000.01314.74
4.3.60.0070.01014.74
4.3.50.0000.01314.74
4.3.40.0000.04714.74
4.3.30.0000.01314.74
4.3.20.0030.01314.74
4.3.10.0000.01714.74
4.3.00.0030.01314.74

preferences:
64.27 ms | 401 KiB | 5 Q