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 $arr = array(); private $field; private $value; function __construct($array, $field, $value) { $this->arr = $array; $this->field = $field; $this->value = $value; } function dataCorrect($arr) { $field = $this->field; $val = $this->value; return $arr[$field] == $val; } } $field = 'name'; $value = 'cert2'; $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.0100.01016.75
8.3.50.0270.00516.34
8.3.40.0080.00818.79
8.3.30.0070.00718.89
8.3.20.0040.00418.82
8.3.10.0040.00418.73
8.3.00.0000.00819.13
8.2.180.0140.00716.75
8.2.170.0150.00422.96
8.2.160.0100.00718.96
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00020.82
8.2.110.0070.00322.25
8.2.100.0120.00017.89
8.2.90.0050.00318.99
8.2.80.0040.00418.03
8.2.70.0040.00417.75
8.2.60.0000.00817.93
8.2.50.0030.00619.76
8.2.40.0040.00422.03
8.2.30.0000.00719.34
8.2.20.0060.00317.69
8.2.10.0040.00417.68
8.2.00.0040.00417.76
8.1.280.0130.00925.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00523.84
8.1.230.0040.00817.83
8.1.220.0080.00017.74
8.1.210.0030.00518.77
8.1.200.0110.00017.48
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0050.00318.64
8.1.160.0040.00419.04
8.1.150.0070.00018.79
8.1.140.0000.00817.46
8.1.130.0000.00819.23
8.1.120.0040.00417.51
8.1.110.0040.00417.48
8.1.100.0070.00017.53
8.1.90.0030.00517.43
8.1.80.0040.00417.48
8.1.70.0070.00017.38
8.1.60.0050.00317.62
8.1.50.0090.00017.47
8.1.40.0040.00417.55
8.1.30.0040.00417.65
8.1.20.0090.00017.69
8.1.10.0040.00417.64
8.1.00.0030.00617.41
8.0.300.0080.00018.77
8.0.290.0000.00816.63
8.0.280.0030.00518.40
8.0.270.0030.00317.20
8.0.260.0070.00016.80
8.0.250.0000.00716.94
8.0.240.0040.00416.94
8.0.230.0030.00316.96
8.0.220.0000.00716.98
8.0.210.0000.00716.84
8.0.200.0030.00317.01
8.0.190.0070.00016.95
8.0.180.0100.00016.95
8.0.170.0040.00416.82
8.0.160.0000.00716.95
8.0.150.0000.00816.89
8.0.140.0040.00416.77
8.0.130.0000.00513.34
8.0.120.0090.00016.89
8.0.110.0070.00016.97
8.0.100.0040.00416.73
8.0.90.0040.00416.91
8.0.80.0130.00316.91
8.0.70.0040.00416.91
8.0.60.0060.00316.73
8.0.50.0030.00616.86
8.0.30.0040.01417.05
8.0.20.0120.00616.91
8.0.10.0040.00417.15
8.0.00.0070.01116.81
7.4.330.0030.00313.00
7.4.320.0030.00316.63
7.4.300.0030.00316.50
7.4.290.0030.00316.58
7.4.280.0050.00516.53
7.4.270.0040.00416.51
7.4.260.0000.00513.19
7.4.250.0000.00916.50
7.4.240.0050.00316.64
7.4.230.0060.00316.71
7.4.220.0160.01016.55
7.4.210.0160.00016.58
7.4.200.0080.00016.41
7.4.190.0000.00716.47
7.4.160.0060.01016.37
7.4.150.0170.00016.61
7.4.140.0110.00716.51
7.4.130.0120.01216.57
7.4.120.0070.01016.44
7.4.110.0090.01216.64
7.4.100.0070.01016.64
7.4.90.0100.00716.53
7.4.80.0160.00616.46
7.4.70.0090.00616.56
7.4.60.0060.01016.45
7.4.50.0050.00016.57
7.4.40.0040.01116.55
7.4.30.0090.00916.61
7.4.00.0070.00714.84
7.3.330.0070.00013.34
7.3.320.0030.00313.29
7.3.310.0030.00316.34
7.3.300.0040.00416.17
7.3.290.0070.00716.28
7.3.280.0060.01016.23
7.3.270.0140.00916.34
7.3.260.0170.00716.52
7.3.250.0090.01216.57
7.3.240.0150.00316.41
7.3.230.0100.00716.41
7.3.210.0140.00316.46
7.3.200.0100.00719.39
7.3.190.0130.00916.36
7.3.180.0100.00716.31
7.3.170.0040.01216.63
7.3.160.0130.00316.47
7.3.120.0040.01215.00
7.2.330.0090.00916.64
7.2.320.0110.00616.62
7.2.310.0070.01016.75
7.2.300.0100.00716.64
7.2.290.0110.01116.51
7.2.00.0080.00818.99
7.1.100.0790.01715.88
7.1.70.0040.00417.22
7.1.60.0070.01719.30
7.1.50.0110.01416.91
7.1.00.0030.07022.40
7.0.200.0150.00016.78
7.0.140.0000.07722.09
7.0.120.0000.07322.18
7.0.60.0130.06719.95
7.0.50.0070.08017.86
7.0.40.0100.05017.75
7.0.30.0070.08317.71
7.0.20.0070.08317.85
7.0.10.0130.07317.85
7.0.00.0100.08017.85
5.6.280.0130.06320.86
5.6.210.0000.09020.48
5.6.200.0100.08318.16
5.6.190.0070.04718.15
5.6.180.0100.05018.16
5.6.170.0030.08018.15
5.6.160.0070.04018.23
5.6.150.0070.07718.15
5.6.140.0000.08318.18
5.6.130.0070.08318.16
5.6.120.0200.07718.16
5.6.110.0100.07718.13
5.6.100.0070.06318.16
5.6.90.0070.07018.09
5.6.80.0070.04317.56
5.6.70.0070.04317.66
5.6.60.0300.05717.66
5.6.50.0000.05017.50
5.6.40.0100.06017.64
5.6.30.0070.04317.50
5.6.20.0000.05717.52
5.6.10.0100.07017.47
5.6.00.0030.05717.50
5.5.350.0070.08020.44
5.5.340.0100.07717.95
5.5.330.0030.07317.95
5.5.320.0000.04717.93
5.5.310.0030.05017.97
5.5.300.0130.07017.99
5.5.290.0030.07017.95
5.5.280.0070.08018.06
5.5.270.0000.05717.94
5.5.260.0100.08317.96
5.5.250.0200.06717.76
5.5.240.0100.06317.39
5.5.230.0070.08017.37
5.5.220.0000.05017.39
5.5.210.0100.07317.46
5.5.200.0030.08017.34
5.5.190.0100.07717.32
5.5.180.0100.04717.33
5.5.160.0000.04717.30
5.5.150.0200.06017.32
5.5.140.0100.05717.29
5.5.130.0070.07717.36
5.5.120.0070.04017.29
5.5.110.0070.05017.39
5.5.100.0100.07017.34
5.5.90.0170.06017.32
5.5.80.0000.04717.23
5.5.70.0100.07717.33
5.5.60.0100.04717.24
5.5.50.0070.07717.33
5.5.40.0030.06317.20
5.5.30.0100.04017.19
5.5.20.0070.05017.18
5.5.10.0070.06717.28
5.5.00.0070.06017.21
5.4.450.0170.07719.30
5.4.440.0000.05319.22
5.4.430.0000.06019.37
5.4.420.0030.04319.21
5.4.410.0070.06719.25
5.4.400.0070.06719.03
5.4.390.0170.06319.10
5.4.380.0070.06319.05
5.4.370.0000.07319.01
5.4.360.0130.04319.27
5.4.350.0100.04719.12
5.4.340.0030.08019.12
5.4.320.0070.08318.96
5.4.310.0230.06019.00
5.4.300.0030.05319.32
5.4.290.0000.05719.09
5.4.280.0100.07018.95
5.4.270.0030.07019.01
5.4.260.0130.07719.10
5.4.250.0030.07319.02
5.4.240.0100.07319.09
5.4.230.0130.06019.02
5.4.220.0030.05019.09
5.4.210.0030.07319.05
5.4.200.0030.05019.27
5.4.190.0100.07318.87
5.4.180.0100.07018.95
5.4.170.0000.04319.13
5.4.160.0070.06019.03
5.4.150.0100.06719.01
5.4.140.0000.05316.31
5.4.130.0030.07316.38
5.4.120.0070.06016.36
5.4.110.0100.07016.23
5.4.100.0070.07316.60
5.4.90.0030.07016.33
5.4.80.0030.04016.32
5.4.70.0100.04316.39
5.4.60.0070.03316.39
5.4.50.0030.05016.38
5.4.40.0100.07016.46
5.4.30.0030.04016.42
5.4.20.0070.07316.32
5.4.10.0070.03316.46
5.4.00.0100.07015.90
5.3.290.0130.07014.52
5.3.280.0000.08314.71
5.3.270.0100.07314.47
5.3.260.0000.07314.57
5.3.250.0070.05014.60
5.3.240.0000.04314.57
5.3.230.0130.07314.66
5.3.220.0030.07714.62
5.3.210.0130.07314.54
5.3.200.0030.06014.59
5.3.190.0070.05714.42
5.3.180.0070.07314.61
5.3.170.0030.08014.42
5.3.160.0030.08314.52
5.3.150.0030.03714.67
5.3.140.0030.04314.61
5.3.130.0100.04314.77
5.3.120.0070.08014.62
5.3.110.0070.03714.59
5.3.100.0130.06014.06
5.3.90.0030.04713.98
5.3.80.0130.06314.05
5.3.70.0030.08014.07
5.3.60.0130.04014.08
5.3.50.0070.06713.98
5.3.40.0030.04713.98
5.3.30.0100.07013.81
5.3.20.0030.05713.75
5.3.10.0030.04013.64
5.3.00.0000.04013.69
5.2.170.0030.06711.12
5.2.160.0030.04711.21
5.2.150.0070.06011.38
5.2.140.0000.05011.20
5.2.130.0100.04011.18
5.2.120.0100.05711.16
5.2.110.0070.06011.02
5.2.100.0030.05011.14
5.2.90.0030.03711.15
5.2.80.0000.03711.15
5.2.70.0070.06311.13
5.2.60.0100.02711.13
5.2.50.0000.03311.02
5.2.40.0030.06010.85
5.2.30.0070.03710.98
5.2.20.0000.03310.96
5.2.10.0100.05310.92
5.2.00.0030.05310.71
5.1.60.0070.05010.08
5.1.50.0070.0379.97
5.1.40.0030.0339.96
5.1.30.0030.04010.39
5.1.20.0100.04010.28
5.1.10.0030.06010.18
5.1.00.0000.03710.11
5.0.50.0070.0278.55
5.0.40.0030.0208.41
5.0.30.0030.0608.20
5.0.20.0000.0378.13
5.0.10.0030.0308.20
5.0.00.0000.0408.22
4.4.90.0000.0207.99
4.4.80.0030.0137.99
4.4.70.0000.0307.99
4.4.60.0030.0307.99
4.4.50.0070.0237.99
4.4.40.0030.0437.99
4.4.30.0030.0307.99
4.4.20.0030.0337.99
4.4.10.0000.0307.99
4.4.00.0000.0407.99
4.3.110.0000.0207.99
4.3.100.0100.0207.99
4.3.90.0070.0307.99
4.3.80.0000.0537.99
4.3.70.0000.0377.99
4.3.60.0030.0337.99
4.3.50.0030.0307.99
4.3.40.0000.0437.99
4.3.30.0030.0207.99
4.3.20.0030.0207.99
4.3.10.0030.0207.99
4.3.00.0030.0207.99

preferences:
49.71 ms | 401 KiB | 5 Q