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']); } } $items = 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.0120.00918.55
8.3.50.0100.00721.21
8.3.40.0110.00418.97
8.3.30.0110.00319.09
8.3.20.0040.00420.35
8.3.10.0040.00421.97
8.3.00.0040.00422.44
8.2.180.0120.00916.88
8.2.170.0100.00322.96
8.2.160.0080.00619.16
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0100.00726.16
8.2.120.0040.00419.38
8.2.110.0040.00422.11
8.2.100.0070.00318.09
8.2.90.0060.00319.23
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0040.00417.93
8.2.50.0030.00518.07
8.2.40.0050.00318.22
8.2.30.0080.00018.14
8.2.20.0040.00417.73
8.2.10.0000.00717.81
8.2.00.0030.00617.72
8.1.280.0090.00625.92
8.1.270.0070.00022.14
8.1.260.0030.00626.35
8.1.250.0070.00728.09
8.1.240.0060.00323.96
8.1.230.0090.00319.10
8.1.220.0040.00417.77
8.1.210.0050.00318.77
8.1.200.0030.00717.35
8.1.190.0000.00817.30
8.1.180.0040.00418.82
8.1.170.0040.00418.59
8.1.160.0000.00722.16
8.1.150.0040.00418.59
8.1.140.0040.00417.46
8.1.130.0000.00717.84
8.1.120.0070.00017.38
8.1.110.0000.00917.48
8.1.100.0040.00417.48
8.1.90.0040.00417.37
8.1.80.0000.00717.48
8.1.70.0030.00517.36
8.1.60.0090.00017.59
8.1.50.0070.00317.44
8.1.40.0020.00517.50
8.1.30.0040.00417.66
8.1.20.0000.00817.50
8.1.10.0030.00517.48
8.1.00.0040.00417.36
8.0.300.0030.00318.77
8.0.290.0000.00817.18
8.0.280.0000.00718.41
8.0.270.0070.00017.14
8.0.260.0000.00816.89
8.0.250.0000.00716.95
8.0.240.0000.00816.84
8.0.230.0060.00016.95
8.0.220.0070.00016.89
8.0.210.0070.00016.81
8.0.200.0080.00016.95
8.0.190.0040.00416.94
8.0.180.0060.00316.84
8.0.170.0040.00416.96
8.0.160.0040.00416.85
8.0.150.0000.00716.87
8.0.140.0030.00616.89
8.0.130.0060.00013.41
8.0.120.0040.00416.92
8.0.110.0040.00416.99
8.0.100.0040.00417.00
8.0.90.0000.00717.00
8.0.80.0130.00316.95
8.0.70.0000.00717.03
8.0.60.0040.00416.97
8.0.50.0050.00216.97
8.0.30.0100.00817.07
8.0.20.0080.01017.40
8.0.10.0000.00717.16
8.0.00.0080.01016.86
7.4.330.0000.00715.00
7.4.320.0000.00716.70
7.4.300.0000.00616.60
7.4.290.0000.00716.76
7.4.280.0060.00016.64
7.4.270.0050.00316.66
7.4.260.0030.00516.64
7.4.250.0040.00416.49
7.4.240.0070.00016.70
7.4.230.0040.00416.45
7.4.220.0040.01316.55
7.4.210.0090.00716.70
7.4.200.0040.00416.54
7.4.190.0050.00216.88
7.4.160.0030.01317.00
7.4.150.0120.00617.40
7.4.140.0130.00517.86
7.4.130.0090.00816.77
7.4.120.0140.00316.59
7.4.110.0040.01416.88
7.4.100.0090.00916.69
7.4.90.0120.00616.54
7.4.80.0120.00619.39
7.4.70.0170.00616.65
7.4.60.0060.01216.86
7.4.50.0090.00016.73
7.4.40.0030.01322.77
7.4.30.0100.00716.86
7.4.00.0070.00415.02
7.3.330.0000.00513.42
7.3.320.0050.00013.39
7.3.310.0030.00316.66
7.3.300.0030.00316.57
7.3.290.0060.01016.51
7.3.280.0050.01216.50
7.3.270.0040.01217.40
7.3.260.0150.00316.52
7.3.250.0110.00816.69
7.3.240.0160.00316.86
7.3.230.0130.00316.56
7.3.210.0090.00916.59
7.3.200.0150.00419.39
7.3.190.0070.01816.59
7.3.180.0080.00816.48
7.3.170.0130.00316.76
7.3.160.0080.00816.73
7.3.120.0070.01115.07
7.2.330.0000.01716.67
7.2.320.0070.01416.96
7.2.310.0040.01216.93
7.2.300.0080.00816.82
7.2.290.0100.00716.62
7.2.60.0030.01317.22
7.2.00.0030.01019.41
7.1.200.0030.01016.05
7.1.100.0070.00718.15
7.1.70.0030.00717.47
7.1.60.0140.01019.82
7.1.50.0070.01416.97
7.1.00.0000.03722.31
7.0.200.0080.00016.82
7.0.140.0070.07322.10
7.0.60.0130.07719.88
7.0.50.0070.05017.89
7.0.40.0130.06720.11
7.0.30.0330.05720.06
7.0.20.0300.06720.05
7.0.10.0030.05020.24
7.0.00.0170.04320.14
5.6.280.0070.07021.00
5.6.210.0130.03020.61
5.6.200.0000.04718.29
5.6.190.0130.04720.48
5.6.180.2670.04320.61
5.6.170.0130.04720.39
5.6.160.0030.05320.71
5.6.150.0000.08318.19
5.6.140.0130.06318.15
5.6.130.0070.07018.22
5.6.120.0030.08321.04
5.6.110.0130.07021.15
5.6.100.0070.06020.98
5.6.90.0100.05321.07
5.6.80.0030.03720.37
5.6.70.1330.06320.38
5.5.350.0130.06320.39
5.5.340.0130.07017.96
5.5.330.0070.05020.21
5.5.320.3600.04720.25
5.5.310.0170.08020.23
5.5.300.0030.04017.98
5.5.290.0100.05317.92
5.5.280.0030.08320.88
5.5.270.0130.06320.85
5.5.260.0070.04020.77
5.5.250.0000.06020.62
5.5.240.0270.07720.15
5.4.450.0570.06319.46
5.4.440.0830.04719.46
5.4.430.0200.07019.18
5.4.420.0170.06719.69
5.4.410.0770.05319.45
5.4.400.0770.05019.18
5.4.390.0700.05019.28
5.4.380.0270.05318.77
5.4.370.0500.05318.69
5.4.360.0330.05318.54
5.4.350.0080.03812.02
5.4.340.0060.03912.02
5.4.320.0070.03712.51
5.4.310.0070.04012.51
5.4.300.0060.04212.51
5.4.290.0080.03612.50
5.4.280.0080.03212.40
5.4.270.0070.04012.40
5.4.260.0100.04719.00
5.4.250.0030.06018.77
5.4.240.0100.05318.90
5.4.230.0100.05018.90
5.4.220.0130.05018.78
5.4.210.0070.05319.00
5.4.200.0100.05018.80
5.4.190.0070.07318.78
5.4.180.0070.05718.89
5.4.170.0100.06018.62
5.4.160.0100.07318.99
5.4.150.0100.05018.89
5.4.140.0200.03716.42
5.4.130.0130.07016.43
5.4.120.0100.05316.34
5.4.110.0100.06016.50
5.4.100.0230.05316.60
5.4.90.0200.04316.54
5.4.80.0030.05316.50
5.4.70.0030.05016.44
5.4.60.0030.05016.31
5.4.50.0070.04716.45
5.4.40.0000.05716.34
5.4.30.0100.04316.38
5.4.20.0070.05016.50
5.4.10.0100.07016.49
5.4.00.0170.06315.99
5.3.290.0100.03912.80
5.3.280.0030.05714.68
5.3.270.0070.07714.62
5.3.260.0030.06014.78
5.3.250.0130.04714.52
5.3.240.0100.05014.70
5.3.230.0170.04014.62
5.3.220.0030.05714.57
5.3.210.0100.06314.57
5.3.200.0130.04714.75
5.3.190.0070.06014.66
5.3.180.0100.04314.48
5.3.170.0130.04314.59
5.3.160.0030.06014.75
5.3.150.0130.06314.56
5.3.140.0100.05014.59
5.3.130.0130.06714.57
5.3.120.0030.06314.72
5.3.110.0070.07714.64
5.3.100.0100.06714.23
5.3.90.0030.07714.03
5.3.80.0100.05014.04
5.3.70.0030.05714.05
5.3.60.0100.06714.23
5.3.50.0000.05314.04
5.3.40.0030.05313.79
5.3.30.0030.05313.93
5.3.20.0100.04313.54
5.3.10.0170.04013.73
5.3.00.0170.04013.65
5.2.170.0000.04711.16
5.2.160.0070.04011.15
5.2.150.0030.04311.14
5.2.140.0070.04711.37
5.2.130.0030.06011.17
5.2.120.0100.04311.10
5.2.110.0000.04311.27
5.2.100.0100.03711.15
5.2.90.0000.04311.07
5.2.80.0100.04011.19
5.2.70.0070.05711.08
5.2.60.0100.04010.96
5.2.50.0000.04711.11
5.2.40.0100.04011.03
5.2.30.0070.05711.05
5.2.20.0100.04311.04
5.2.10.0030.04010.77
5.2.00.0170.03010.71
5.1.60.0070.03310.02
5.1.50.0070.0479.93
5.1.40.0130.03310.09
5.1.30.0100.05010.25
5.1.20.0100.03710.35
5.1.10.0030.04010.20
5.1.00.0030.03710.06
5.0.50.0130.0208.64
5.0.40.0030.0408.50
5.0.30.0030.0438.32
5.0.20.0000.0308.32
5.0.10.0000.0308.32
5.0.00.0000.0538.32
4.4.90.0070.0178.32
4.4.80.0000.0308.32
4.4.70.0000.0238.32
4.4.60.0070.0178.32
4.4.50.0030.0208.32
4.4.40.0070.0338.32
4.4.30.0100.0238.32
4.4.20.0030.0238.32
4.4.10.0030.0208.32
4.4.00.0000.0378.32
4.3.110.0030.0308.32
4.3.100.0000.0238.32
4.3.90.0000.0238.32
4.3.80.0100.0278.32
4.3.70.0030.0208.32
4.3.60.0070.0178.32
4.3.50.0000.0238.32
4.3.40.0030.0308.32
4.3.30.0000.0238.32
4.3.20.0000.0238.32
4.3.10.0000.0278.32
4.3.00.0170.0177.01

preferences:
54.72 ms | 401 KiB | 5 Q