3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PriceFilter { private $minimumValue; private $maximumValue; public function __construct($min, $max) { $this->minimumValue = $min; $this->maximumValue = $max; } public function __invoke($value) { return $value >= $this->minimumValue && $value < $this->maximumValue; } } $values = [1, 2, 3, 5, 8, 13, 21]; print_r(array_filter($values, new PriceFilter(5, 20))); print_r(array_filter($values, new PriceFilter(2, 6)));

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.0130.00318.56
8.3.50.0110.00418.30
8.3.40.0110.00618.84
8.3.30.0090.01218.60
8.3.20.0040.00419.78
8.3.10.0050.00320.53
8.3.00.0070.00023.61
8.2.180.0110.00716.73
8.2.170.0180.00322.96
8.2.160.0070.00722.30
8.2.150.0000.00724.18
8.2.140.0050.00324.66
8.2.130.0040.00420.47
8.2.120.0000.00826.35
8.2.110.0030.00619.27
8.2.100.0080.00417.71
8.2.90.0040.00419.08
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0040.00717.78
8.2.50.0080.00019.21
8.2.40.0060.00320.42
8.2.30.0000.00720.30
8.2.20.0030.00517.99
8.2.10.0030.00618.13
8.2.00.0040.00418.16
8.1.280.0170.00025.92
8.1.270.0080.00020.75
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00823.89
8.1.230.0090.00317.71
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0060.00317.38
8.1.190.0030.00617.35
8.1.180.0060.00318.10
8.1.170.0000.00918.63
8.1.160.0040.00418.86
8.1.150.0000.00820.34
8.1.140.0000.00719.64
8.1.130.0030.00320.79
8.1.120.0030.00317.39
8.1.110.0030.00617.35
8.1.100.0040.00417.46
8.1.90.0000.00817.36
8.1.80.0000.00817.50
8.1.70.0030.00317.45
8.1.60.0040.00417.66
8.1.50.0000.00717.41
8.1.40.0050.00317.53
8.1.30.0030.00517.68
8.1.20.0030.00617.56
8.1.10.0040.00417.55
8.1.00.0000.00817.46
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0070.00018.36
8.0.270.0040.00417.27
8.0.260.0030.00317.18
8.0.250.0000.00816.98
8.0.240.0050.00316.81
8.0.230.0030.00316.98
8.0.220.0000.00716.84
8.0.210.0050.00216.96
8.0.200.0030.00316.84
8.0.190.0000.00716.93
8.0.180.0040.00316.88
8.0.170.0000.00716.98
8.0.160.0030.00316.99
8.0.150.0040.00416.94
8.0.140.0000.00716.89
8.0.130.0000.00713.32
8.0.120.0070.00016.83
8.0.110.0030.00316.77
8.0.100.0050.00216.94
8.0.90.0030.00316.77
8.0.80.0100.01016.82
8.0.70.0000.00716.85
8.0.60.0000.00816.91
8.0.50.0000.00816.83
8.0.30.0060.01116.93
8.0.20.0090.01317.40
8.0.10.0070.00017.04
8.0.00.0140.00316.82
7.4.330.0030.00315.55
7.4.320.0030.00316.52
7.4.300.0040.00416.48
7.4.290.0030.00816.46
7.4.280.0080.00016.56
7.4.270.0030.00516.60
7.4.260.0030.00816.57
7.4.250.0000.00716.40
7.4.240.0020.00516.61
7.4.230.0000.00716.40
7.4.220.0120.00616.71
7.4.210.0120.00616.65
7.4.200.0000.00716.31
7.4.160.0100.00716.40
7.4.150.0070.01117.40
7.4.140.0120.00617.86
7.4.130.0130.00616.44
7.4.120.0100.00916.46
7.4.110.0100.00916.65
7.4.100.0090.01216.52
7.4.90.0130.01016.64
7.4.80.0030.01319.39
7.4.70.0130.00316.59
7.4.60.0060.01416.52
7.4.50.0030.01316.23
7.4.40.0090.00616.47
7.4.30.0090.00616.55
7.4.00.0080.00414.83
7.3.330.0070.00013.27
7.3.320.0070.00013.11
7.3.310.0000.00716.15
7.3.300.0030.00316.14
7.3.290.0060.01116.20
7.3.280.0120.00716.26
7.3.270.0080.01117.40
7.3.260.0140.00916.45
7.3.250.0070.01116.39
7.3.240.0100.00616.25
7.3.230.0100.00616.39
7.3.210.0100.00716.45
7.3.200.0070.01016.61
7.3.190.0150.00616.30
7.3.180.0100.00716.49
7.3.170.0130.01016.49
7.3.160.0000.01516.46
7.2.330.0120.00616.62
7.2.320.0100.00716.73
7.2.310.0100.01016.89
7.2.300.0080.01116.59
7.2.290.0090.00616.57
7.2.60.0030.00916.91
7.1.200.0090.00315.83
7.1.70.0030.00316.99
7.1.60.0070.00716.90
7.1.20.0370.09040.36
7.1.10.0200.08022.28
7.1.00.0070.07322.30
7.0.200.0040.01216.71
7.0.160.0130.07721.82
7.0.150.0130.07321.89
7.0.140.0070.08321.82
7.0.130.0200.06021.82
7.0.120.0100.07021.86
7.0.110.0000.07021.77
7.0.100.0130.06321.81
7.0.90.0170.07320.18
7.0.80.0100.07721.77
7.0.70.0170.06021.84
7.0.60.0130.07019.89
7.0.50.0000.08021.89
7.0.40.1000.07320.05
7.0.30.0170.07321.98
7.0.20.0070.09321.84
7.0.10.0130.08321.80
7.0.00.0100.08721.81

preferences:
31.33 ms | 400 KiB | 5 Q