3v4l.org

run code in 300+ PHP versions simultaneously
<?php $certificates = array( array('num' => '111', 'name' => 'cert1'), array('num' => '222', 'name' => 'cert2') ); //получаем массив который содержит 'name' => 'cert2' class ArrayFilter { private $array; private $field; private $value; function __construct($array, $field, $value) { $this->array = $array; $this->field = $field; $this->value = $value; } function dataCorrect() { return $this->array[$this->field] == $this->value; } } $field = 'name'; $value = 'cert1'; $out = array_filter( $certificates, array(new ArrayFilter($certificates, $field, $value), 'dataCorrect') ); print_r($out);

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.0110.01116.86
8.3.50.0090.01216.32
8.3.40.0220.00018.66
8.3.30.0070.00718.93
8.3.20.0060.00318.87
8.3.10.0060.01220.58
8.3.00.0100.00317.50
8.2.180.0100.01016.75
8.2.170.0150.00622.96
8.2.160.0070.00722.17
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0110.00326.16
8.2.120.0040.00419.96
8.2.110.0060.00320.90
8.2.100.0040.00717.91
8.2.90.0040.00419.36
8.2.80.0030.00617.97
8.2.70.0050.00317.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0050.00218.08
8.2.20.0000.00817.82
8.2.10.0080.00019.46
8.2.00.0040.00417.73
8.1.280.0070.00725.92
8.1.270.0030.00624.66
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00721.12
8.1.230.0110.00017.51
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0040.00717.25
8.1.190.0050.00317.13
8.1.180.0080.00018.10
8.1.170.0080.00018.82
8.1.160.0070.00018.89
8.1.150.0000.00818.57
8.1.140.0040.00417.46
8.1.130.0080.00017.70
8.1.120.0030.00317.47
8.1.110.0000.00717.43
8.1.100.0000.00817.48
8.1.90.0030.00317.54
8.1.80.0040.00417.48
8.1.70.0040.00417.38
8.1.60.0030.00917.60
8.1.50.0040.00417.48
8.1.40.0040.00417.40
8.1.30.0030.00617.66
8.1.20.0000.00817.70
8.1.10.0030.00617.49
8.1.00.0000.00717.48
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0040.00418.46
8.0.270.0030.00317.27
8.0.260.0000.00716.94
8.0.250.0030.00516.97
8.0.240.0030.00816.91
8.0.230.0040.00416.90
8.0.220.0070.00016.97
8.0.210.0040.00416.91
8.0.200.0000.00716.92
8.0.190.0000.00817.05
8.0.180.0040.00417.00
8.0.170.0030.00517.01
8.0.160.0040.00416.88
8.0.150.0040.00416.93
8.0.140.0000.00816.84
8.0.130.0070.00013.36
8.0.120.0040.00416.86
8.0.110.0050.00217.08
8.0.100.0090.00017.01
8.0.90.0000.00716.99
8.0.80.0070.01016.92
8.0.70.0000.00717.08
8.0.60.0040.00417.00
8.0.50.0050.00316.95
8.0.30.0110.00716.97
8.0.20.0160.01117.26
8.0.10.0040.00416.90
8.0.00.0120.00516.74
7.4.330.0000.00513.04
7.4.320.0030.00316.52
7.4.300.0000.00616.61
7.4.290.0030.00316.61
7.4.280.0090.00016.44
7.4.270.0030.00316.51
7.4.260.0000.00513.35
7.4.250.0060.00316.67
7.4.240.0000.00716.52
7.4.230.0070.00016.71
7.4.220.0050.00216.47
7.4.210.0120.00716.48
7.4.200.0000.00716.73
7.4.190.0070.00016.69
7.4.160.0090.00916.58
7.4.150.0060.01316.52
7.4.140.0130.00716.55
7.4.130.0110.00916.54
7.4.120.0100.00716.62
7.4.110.0030.01316.61
7.4.100.0080.00816.53
7.4.90.0060.01216.47
7.4.80.0090.00716.65
7.4.70.0150.00516.54
7.4.60.0000.01616.52
7.4.50.0000.00516.57
7.4.40.0030.00816.54
7.4.30.0100.00516.69
7.4.00.0080.00614.77
7.3.330.0060.00013.31
7.3.320.0050.00013.42
7.3.310.0030.00316.29
7.3.300.0030.00316.45
7.3.290.0100.01016.36
7.3.280.0080.00916.47
7.3.270.0100.00616.48
7.3.260.0100.01016.58
7.3.250.0130.00716.55
7.3.240.0090.00616.63
7.3.230.0060.01016.65
7.3.210.0060.01116.45
7.3.200.0140.00719.39
7.3.190.0120.00516.62
7.3.180.0110.00516.37
7.3.170.0060.00916.68
7.3.160.0170.00016.40
7.3.120.0130.00314.84
7.2.330.0120.00916.55
7.2.320.0110.01116.37
7.2.310.0060.01316.71
7.2.300.0230.00016.63
7.2.290.0070.01016.73
7.2.00.0040.00819.47
7.1.100.0030.01018.05
7.1.70.0000.00917.01
7.1.60.0170.00719.40
7.1.50.0130.01017.06
7.1.00.0000.08022.54
7.0.200.0030.00716.75
7.0.140.0070.07022.09
7.0.120.0030.07722.15
7.0.60.0230.07019.93
7.0.50.0030.08317.88
7.0.40.0070.04020.15
7.0.30.0030.04320.03
7.0.20.0000.04720.16
7.0.10.0130.04720.30
7.0.00.0000.04320.26
5.6.280.0070.07021.13
5.6.210.0100.08020.49
5.6.200.0070.04718.18
5.6.190.0070.04020.63
5.6.180.0000.04320.61
5.6.170.0070.03720.61
5.6.160.0070.04020.77
5.6.150.0100.05320.44
5.6.140.0000.04320.17
5.6.130.0100.03720.33
5.6.120.0000.04320.52
5.6.110.0030.04320.43
5.6.100.0130.03320.18
5.6.90.0100.03320.47
5.6.80.0030.05019.62
5.6.70.0000.04319.55
5.6.60.0100.08319.90
5.6.50.0130.05719.88
5.6.40.0030.04019.70
5.6.30.0100.03719.69
5.6.20.0070.04319.52
5.6.10.0070.08019.76
5.6.00.0130.06719.50
5.5.350.0000.09020.39
5.5.340.0130.07718.08
5.5.330.0070.03720.47
5.5.320.0070.03720.37
5.5.310.0000.04320.43
5.5.300.0030.04320.11
5.5.290.0070.04019.98
5.5.280.0000.04320.03
5.5.270.0030.04019.96
5.5.260.0100.03720.29
5.5.250.0030.04319.80
5.5.240.0070.03719.68
5.5.230.0070.04019.35
5.5.220.0070.08019.66
5.5.210.0030.08319.49
5.5.200.0070.06319.32
5.5.190.0030.06019.55
5.5.180.0070.07319.48
5.5.160.0070.04719.34
5.5.150.0170.06719.55
5.5.140.0030.04319.51
5.5.130.0130.07319.51
5.5.120.0030.08719.66
5.5.110.0130.07319.39
5.5.100.0100.05719.29
5.5.90.0030.08019.57
5.5.80.0130.07319.41
5.5.70.0100.03719.55
5.5.60.0070.07719.45
5.5.50.0070.07719.48
5.5.40.0030.04319.32
5.5.30.0000.04319.20
5.5.20.0170.06019.46
5.5.10.0030.05719.31
5.5.00.0100.07719.45
5.4.450.0100.03719.18
5.4.440.0030.04019.20
5.4.430.0000.04019.48
5.4.420.0000.04019.18
5.4.410.0070.03319.34
5.4.400.0070.03319.12
5.4.390.0070.03319.08
5.4.380.0070.04019.24
5.4.370.0100.04319.14
5.4.360.0000.06019.25
5.4.350.0000.04319.08
5.4.340.0030.08018.85
5.4.320.0130.05019.21
5.4.310.0030.05319.08
5.4.300.0100.07719.16
5.4.290.0030.06019.14
5.4.280.0070.04018.97
5.4.270.0170.07019.20
5.4.260.0100.07319.14
5.4.250.0070.03718.85
5.4.240.0070.06319.14
5.4.230.0130.06319.00
5.4.220.0100.08718.84
5.4.210.0070.06319.14
5.4.200.0070.05719.23
5.4.190.0070.04019.06
5.4.180.0130.06718.91
5.4.170.0130.07019.14
5.4.160.0100.07019.22
5.4.150.0100.04719.05
5.4.140.0000.04016.50
5.4.130.0030.04316.25
5.4.120.0000.08016.30
5.4.110.0100.05016.41
5.4.100.0030.04016.47
5.4.90.0100.03016.67
5.4.80.0000.07716.28
5.4.70.0070.07016.54
5.4.60.0100.06716.70
5.4.50.0000.07716.32
5.4.40.0030.04316.38
5.4.30.0100.07016.34
5.4.20.0030.03716.50
5.4.10.0070.04316.44
5.4.00.0070.05015.83
5.3.290.0000.05014.83
5.3.280.0030.04014.60
5.3.270.0070.05014.64
5.3.260.0100.07014.66
5.3.250.0070.06714.64
5.3.240.0130.03014.66
5.3.230.0170.03714.50
5.3.220.0030.08014.73
5.3.210.0070.05314.58
5.3.200.0130.07014.60
5.3.190.0000.04314.65
5.3.180.0100.03314.60
5.3.170.0100.07014.51
5.3.160.0070.07714.57
5.3.150.0100.07314.72
5.3.140.0000.07014.62
5.3.130.0070.04014.63
5.3.120.0070.06714.70
5.3.110.0070.07714.56
5.3.100.0070.07714.09
5.3.90.0000.05713.93
5.3.80.0000.04014.07
5.3.70.0030.03714.10
5.3.60.0070.06013.90
5.3.50.0070.06314.00
5.3.40.0000.07713.84
5.3.30.0030.04013.92
5.3.20.0100.07013.72
5.3.10.0130.06713.70
5.3.00.0030.07713.61
5.2.170.0030.03011.09
5.2.160.0070.02711.20
5.2.150.0030.04711.16
5.2.140.0070.06311.19
5.2.130.0070.05311.15
5.2.120.0000.04011.16
5.2.110.0100.06011.26
5.2.100.0070.03311.15
5.2.90.0030.03311.17
5.2.80.0070.05011.07
5.2.70.0070.06010.99
5.2.60.0030.06311.02
5.2.50.0000.05011.05
5.2.40.0070.06010.89
5.2.30.0100.04710.99
5.2.20.0000.05710.96
5.2.10.0030.06311.02
5.2.00.0000.06710.73
5.1.60.0000.02710.04
5.1.50.0070.0339.98
5.1.40.0030.02710.07
5.1.30.0030.05710.30
5.1.20.0100.05010.40
5.1.10.0070.05310.03
5.1.00.0070.0379.98
5.0.50.0000.0408.55
5.0.40.0000.0278.48
5.0.30.0070.0478.22
5.0.20.0000.0378.18
5.0.10.0030.0338.33
5.0.00.0070.0508.14
4.4.90.0000.0377.37
4.4.80.0000.0277.37
4.4.70.0000.0277.37
4.4.60.0000.0237.37
4.4.50.0000.0407.37
4.4.40.0000.0437.37
4.4.30.0030.0337.37
4.4.20.0030.0237.37
4.4.10.0030.0177.37
4.4.00.0030.0577.37
4.3.110.0000.0337.37
4.3.100.0030.0307.37
4.3.90.0070.0107.37
4.3.80.0030.0407.37
4.3.70.0000.0207.37
4.3.60.0000.0177.37
4.3.50.0000.0407.37
4.3.40.0000.0537.37
4.3.30.0030.0237.37
4.3.20.0000.0207.37
4.3.10.0070.0307.37
4.3.00.0000.0377.37

preferences:
46.7 ms | 401 KiB | 5 Q