3v4l.org

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

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.80.0120.00416.73
8.5.70.0110.00316.77
8.5.60.0100.00716.80
8.5.50.0050.00416.63
8.5.30.0040.00419.55
8.5.20.0070.01117.84
8.5.10.0040.00516.68
8.5.00.0110.01119.95
8.4.230.0130.00819.48
8.4.220.0120.00819.26
8.4.210.0060.00319.30
8.4.180.0150.00719.59
8.4.170.0110.01120.42
8.4.160.0120.01121.43
8.4.150.0080.00516.78
8.4.140.0110.01117.34
8.4.130.0050.00517.52
8.4.120.0120.00320.52
8.4.110.0130.00722.43
8.4.100.0100.01018.35
8.4.90.0120.00918.57
8.4.80.0070.00717.73
8.4.70.0100.01018.21
8.4.60.0050.00619.00
8.4.50.0120.00818.45
8.4.40.0150.00617.32
8.4.30.0000.00818.81
8.4.20.0180.00318.70
8.4.10.0120.00319.38
8.3.320.0090.01018.28
8.3.310.0110.00920.02
8.3.300.0120.00918.20
8.3.290.0100.01120.95
8.3.280.0100.01118.22
8.3.270.0130.00616.26
8.3.260.0130.00616.60
8.3.250.0120.00618.78
8.3.240.0150.00416.47
8.3.230.0100.01016.41
8.3.220.0080.01117.27
8.3.210.0100.00516.55
8.3.200.0040.00518.30
8.3.190.0090.00817.04
8.3.180.0120.00616.56
8.3.170.0000.00818.91
8.3.160.0050.00518.31
8.3.150.0140.00416.70
8.3.140.0070.00717.06
8.3.130.0030.00618.46
8.3.120.0070.00418.83
8.3.110.0120.00916.32
8.3.100.0030.00724.06
8.3.90.0090.00926.77
8.3.80.0040.00418.18
8.3.70.0040.01218.30
8.3.60.0090.00918.39
8.3.50.0110.00416.49
8.3.40.0070.01320.48
8.3.30.0120.00021.90
8.3.20.0000.00724.18
8.3.10.0000.00724.66
8.3.00.0130.00628.09
8.2.320.0110.01017.91
8.2.310.0120.00718.04
8.2.300.0120.00922.13
8.2.290.0070.00720.51
8.2.280.0120.00618.38
8.2.270.0100.00717.39
8.2.260.0060.01316.48
8.2.250.0040.00416.38
8.2.240.0030.00618.86
8.2.230.0060.00920.94
8.2.220.0000.01237.54
8.2.210.0040.00426.77
8.2.200.0040.00718.41
8.2.190.0110.00716.58
8.2.180.0120.00325.92
8.2.170.0130.00318.79
8.2.160.0040.01122.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0120.00628.09
8.2.120.0090.00928.09
8.2.110.0120.00628.09
8.2.100.0150.00428.09
8.2.90.0140.00428.09
8.2.80.0200.00028.09
8.2.70.0110.01128.09
8.2.60.0120.00328.09
8.2.50.0140.00628.09
8.2.40.0040.01528.09
8.2.30.0120.00628.09
8.2.20.0040.01228.09
8.2.10.0120.00928.09
8.2.00.0110.00728.09
8.1.340.0090.01117.49
8.1.330.0110.00721.76
8.1.320.0140.00615.94
8.1.310.0070.00717.79
8.1.300.0100.00018.23
8.1.290.0060.00330.84
8.1.280.0070.01025.92
8.1.270.0030.00622.12
8.1.260.0090.00928.09
8.1.250.0110.00728.09
8.1.240.0140.00728.09
8.1.230.0120.00328.09
8.1.220.0080.00828.09
8.1.210.0130.00328.09
8.1.200.0060.01028.09
8.1.190.0200.00028.09
8.1.180.0100.00628.09
8.1.170.0130.00728.09
8.1.160.0160.00328.09
8.1.150.0030.01328.09
8.1.140.0170.00028.09
8.1.130.0110.00428.09
8.1.120.0000.00828.09
8.1.110.0040.00428.09
8.1.100.0080.00028.09
8.1.90.0040.00428.09
8.1.80.0040.00428.09
8.1.70.0040.00428.09
8.1.60.0060.00328.09
8.1.50.0030.00628.09
8.1.40.0050.00328.09
8.1.30.0040.00428.09
8.1.20.0040.00428.09
8.1.10.0040.00428.09
8.1.00.0040.00428.09

preferences:
64.99 ms | 1019 KiB | 5 Q