3v4l.org

run code in 300+ PHP versions simultaneously
<?php //класс Validator //$this->rules - массив, в котором ключи - строки - названия полей, а элементы - массив, в котором ключи цифры от 0 до n, а //элементы - объекты-правила-валидации. public function validate(Enrollee $enrollee): ErrorList { $errorList = new ErrorList(); foreach ($this->rules as $fieldName => $checklist) { foreach ($checklist as $rule) { $result = $rule($enrollee->get($fieldName)); if ($result) { $errorList->add($fieldName, $result); } } } return $errorList; }

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.10.0040.00424.66
8.3.00.0000.00824.66
8.2.140.0000.00924.66
8.2.130.0040.00424.66
8.2.120.0040.00424.66
8.2.110.0040.00424.66
8.2.100.0000.00924.66
8.2.90.0000.00824.66
8.2.80.0040.00424.66
8.2.70.0080.00024.66
8.2.60.0040.00424.66
8.2.50.0040.00424.66
8.2.40.0030.00524.66
8.2.30.0050.00324.66
8.2.20.0050.00324.66
8.2.10.0080.00024.66
8.2.00.0030.00624.66
8.1.270.0000.00824.66
8.1.260.0040.00424.66
8.1.250.0080.00024.66
8.1.240.0040.00424.66
8.1.230.0080.00024.66
8.1.220.0090.00024.66
8.1.210.0080.00024.66
8.1.200.0080.00024.66
8.1.190.0000.00824.66
8.1.180.0030.00624.66
8.1.170.0080.00024.66
8.1.160.0000.00824.66
8.1.150.0050.00324.66
8.1.140.0040.00424.66
8.1.130.0080.00024.66
8.1.120.0040.00424.66
8.1.110.0030.00524.66
8.1.100.0050.00324.66
8.1.90.0040.00424.66
8.1.80.0040.00424.66
8.1.70.0040.00424.66
8.1.60.0080.00024.66
8.1.50.0040.00424.66
8.1.40.0000.00824.66
8.1.30.0080.00024.66
8.1.20.0050.00324.66
8.1.10.0050.00324.66
8.1.00.0080.00024.66

preferences:
132.22 ms | 993 KiB | 7 Q