3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Validator { private $rules; private $enrollee; private $detectedValidationErrors; public function __construct($rules, $enrollee, $detectedValidationErrors) { $this->rules = $rules; $this->enrollee = $enrollee; $this->detectedValidationErrors = $detectedValidationErrors; } public function carryOutVerification() { foreach ($this->rules as $key => $value) { foreach ($value as $key1 => $value1) { $result = $value1($this->enrollee->get($key)); if (empty($result)==false) { $errorText = $this->detectedValidationErrors->get($key); $errorText .= $result; $this->detectedValidationErrors->set($key, $errorText); } } } } }

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.4.120.0120.00824.23
8.4.110.0070.00720.56
8.4.100.0120.00818.71
8.4.90.0140.00720.66
8.4.80.0060.00219.39
8.4.70.0100.01117.66
8.4.60.0100.01120.42
8.4.50.0110.01020.16
8.4.40.0090.00617.43
8.4.30.0110.00818.85
8.4.20.0130.00717.92
8.4.10.0000.01619.22
8.3.250.0130.00617.19
8.3.240.0110.00817.13
8.3.230.0120.00816.57
8.3.220.0100.00818.81
8.3.210.0130.00716.63
8.3.200.0030.00516.72
8.3.190.0040.00418.78
8.3.180.0060.00416.32
8.3.170.0060.01218.63
8.3.160.0110.00618.80
8.3.150.0130.01018.49
8.3.140.0080.00016.32
8.3.130.0190.00018.25
8.3.120.0000.00819.02
8.3.110.0080.00020.94
8.3.100.0030.00724.06
8.3.90.0030.00526.77
8.3.80.0050.00516.38
8.3.70.0160.00316.58
8.3.60.0100.01016.63
8.3.50.0060.00918.45
8.3.40.0150.00320.34
8.3.30.0030.01021.63
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0090.00928.09
8.2.290.0090.01020.18
8.2.280.0060.00918.01
8.2.270.0060.01217.14
8.2.260.0060.00319.70
8.2.250.0080.00018.07
8.2.240.0030.00617.18
8.2.230.0090.00022.58
8.2.220.0060.00337.54
8.2.210.0080.00026.77
8.2.200.0090.00316.50
8.2.190.0120.00316.58
8.2.180.0110.00718.38
8.2.170.0040.01118.88
8.2.160.0160.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0100.00628.09
8.2.120.0120.00328.09
8.2.110.0040.01128.09
8.2.100.0070.00728.09
8.2.90.0070.00728.09
8.2.80.0040.00428.09
8.2.70.0000.00828.09
8.2.60.0040.00428.09
8.2.50.0050.00328.09
8.2.40.0030.00528.09
8.2.30.0050.00328.09
8.2.20.0080.00028.09
8.2.10.0040.00428.09
8.2.00.0040.00428.09
8.1.330.0110.00721.93
8.1.320.0130.00616.19
8.1.310.0030.00516.88
8.1.300.0000.01116.06
8.1.290.0060.00318.88
8.1.280.0100.01025.92
8.1.270.0040.00423.79
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0040.00428.09
8.1.230.0000.00828.09
8.1.220.0030.00528.09
8.1.210.0030.00528.09
8.1.200.0040.00428.09
8.1.190.0040.00428.09
8.1.180.0040.00428.09
8.1.170.0040.00428.09
8.1.160.0080.00028.09
8.1.150.0000.00828.09
8.1.140.0040.00428.09
8.1.130.0050.00328.09
8.1.120.0050.00328.09
8.1.110.0050.00328.09
8.1.100.0080.00028.09
8.1.90.0060.00328.09
8.1.80.0060.00328.09
8.1.70.0030.00528.09
8.1.60.0070.00328.09
8.1.50.0050.00328.09
8.1.40.0000.00828.09
8.1.30.0080.00028.09
8.1.20.0080.00028.09
8.1.10.0040.00428.09
8.1.00.0080.00028.09

preferences:
52.05 ms | 403 KiB | 5 Q