3v4l.org

run code in 500+ PHP versions simultaneously
<?php class ErrorList { private array $errors; public function add(string $fieldName, ValidationError $validationError): void { $this->errors[$fieldName][] = $validationError; } public function getListOfFieldErrors(string $fieldName): array { $result = $this->errors[$fieldName] ?? []; if (!$result) { return $result; } foreach ($result as $key => $error) { $result [$key] = $error->get("text"); } return $result; } public function isEmpty(): bool { return empty($this->errors); } }

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.5.70.0110.00616.71
8.5.60.0140.00516.35
8.5.50.0070.00716.55
8.5.30.0110.00721.07
8.5.20.0140.00817.82
8.5.10.0100.00816.59
8.5.00.0140.00819.82
8.4.220.0040.00819.40
8.4.210.0080.00319.43
8.4.180.0130.00919.47
8.4.170.0110.01023.71
8.4.160.0150.00625.59
8.4.150.0070.00516.75
8.4.140.0120.01017.60
8.4.130.0040.00518.70
8.4.120.0100.01017.73
8.4.110.0130.01017.81
8.4.100.0130.00817.50
8.4.90.0130.00820.72
8.4.80.0040.00519.36
8.4.70.0120.00817.93
8.4.60.0170.00618.92
8.4.50.0140.00720.09
8.4.40.0030.01617.53
8.4.30.0130.00618.89
8.4.20.0100.01018.73
8.4.10.0050.00319.35
8.3.310.0160.00518.48
8.3.300.0110.01019.38
8.3.290.0120.00820.92
8.3.280.0120.00918.35
8.3.270.0130.00816.46
8.3.260.0090.01116.57
8.3.250.0070.00316.74
8.3.240.0140.00516.36
8.3.230.0110.00916.45
8.3.220.0040.00318.67
8.3.210.0110.00716.52
8.3.200.0050.00618.39
8.3.190.0110.01116.88
8.3.180.0090.00616.67
8.3.170.0090.00619.03
8.3.160.0100.00419.93
8.3.150.0140.00418.64
8.3.140.0110.00716.43
8.3.130.0090.00618.36
8.3.120.0000.00918.94
8.3.110.0150.00320.94
8.3.100.0050.00524.06
8.3.90.0080.00026.77
8.3.80.0000.00917.97
8.3.70.0120.00316.38
8.3.60.0100.01018.31
8.3.50.0160.00316.69
8.3.40.0070.00720.34
8.3.30.0040.01120.17
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0210.00728.09
8.2.310.0140.00617.96
8.2.300.0110.01017.95
8.2.290.0120.00616.70
8.2.280.0060.00220.14
8.2.270.0090.00617.30
8.2.260.0110.00818.34
8.2.250.0150.00016.35
8.2.240.0040.01518.60
8.2.230.0040.00422.58
8.2.220.0030.00637.54
8.2.210.0090.00926.77
8.2.200.0060.00316.38
8.2.190.0070.01416.60
8.2.180.0130.00316.50
8.2.170.0120.00918.59
8.2.160.0070.00722.96
8.2.150.0060.00625.66
8.2.140.0050.00324.66
8.2.130.0140.00728.09
8.2.120.0160.01028.09
8.2.110.0280.00028.09
8.2.100.0230.01028.09
8.2.90.0150.01228.09
8.2.80.0190.00928.09
8.2.70.0170.01428.09
8.2.60.0220.01028.09
8.2.50.0190.00928.09
8.2.40.0140.01728.09
8.2.30.0210.00428.09
8.2.20.0140.01028.09
8.2.10.0180.01128.09
8.2.00.0150.00928.09
8.1.340.0110.00817.49
8.1.330.0140.00615.99
8.1.320.0100.00916.06
8.1.310.0030.00518.55
8.1.300.0120.00317.77
8.1.290.0090.00030.84
8.1.280.0110.00725.92
8.1.270.0070.00423.82
8.1.260.0110.00628.09
8.1.250.0160.01028.09
8.1.240.0130.01328.09
8.1.230.0270.00428.09
8.1.220.0220.00928.09
8.1.210.0270.00628.09
8.1.200.0210.00628.09
8.1.190.0120.00328.09
8.1.180.0140.01228.09
8.1.170.0140.00028.09
8.1.160.0110.00328.09
8.1.150.0110.00328.09
8.1.140.0150.00928.09
8.1.130.0120.00328.09
8.1.120.0070.00728.09
8.1.110.0070.00728.09
8.1.100.0060.00328.09
8.1.90.0080.00428.09
8.1.80.0200.00428.09
8.1.70.0110.00828.09
8.1.60.0080.00828.09
8.1.50.0100.00028.09
8.1.40.0150.00028.09
8.1.30.0160.00028.09
8.1.20.0090.00628.09
8.1.10.0130.00328.09
8.1.00.0160.00028.09

preferences:
61.85 ms | 1003 KiB | 5 Q