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)
5.4.190.0170.04512.38
5.4.180.0150.04212.38
5.4.170.0170.04012.39
5.4.160.0280.06012.38
5.4.150.0150.04412.38
5.4.140.0150.04412.07
5.4.130.0120.04512.05
5.4.120.0140.04212.02
5.4.110.0210.03512.01
5.4.100.0150.04312.02
5.4.90.0200.03812.01
5.4.80.0220.06612.01
5.4.70.0140.04212.01
5.4.60.0160.04312.00
5.4.50.0210.04112.01
5.4.40.0200.04012.00
5.4.30.0200.04211.99
5.4.20.0190.04511.99
5.4.10.0160.04211.99
5.4.00.0140.04111.48
5.3.270.0190.04212.72
5.3.260.0140.04612.71
5.3.250.0300.08912.72
5.3.240.0200.03912.72
5.3.230.0200.04212.71
5.3.220.0170.04212.68
5.3.210.0160.04412.68
5.3.200.0170.04212.68
5.3.190.0160.04712.68
5.3.180.0160.04412.68
5.3.170.0410.08212.67
5.3.160.0180.04212.68
5.3.150.0150.04512.68
5.3.140.0130.04612.66
5.3.130.0140.04512.66
5.3.120.0170.04312.66
5.3.110.0190.04212.66
5.3.100.0170.04212.11
5.3.90.0160.04512.09
5.3.80.0180.04312.07
5.3.70.0340.09012.08
5.3.60.0120.04712.06
5.3.50.0150.04412.00
5.3.40.0170.04112.00
5.3.30.0170.04011.96
5.3.20.0150.04311.73
5.3.10.0270.06011.69
5.3.00.0170.04111.68

preferences:
136.73 ms | 1386 KiB | 7 Q