3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Yoba { private int $age; public function getAge () : int { return $this->age; } public function setAge (int $age) : void { if (!$this->ageIsValid($age)) { throw new Exception("0 < \$age <= 100, passed " . $age); } $this->age = $age; } public function ageIsValid (int $age) : bool { if (($age > 0) && ($age <= 100)) { return true; } return false; } } $yo = new Yoba(); $yo->setAge(10); echo $yo->getAge(); $yo->setAge(1000); echo $yo->getAge();

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.0100.01020.64
8.4.110.0110.00922.46
8.4.100.0130.00718.28
8.4.90.0030.00818.64
8.4.80.0060.00517.89
8.4.70.0130.00718.08
8.4.60.0150.00720.55
8.4.50.0070.01418.54
8.4.40.0110.00617.70
8.4.30.0170.00318.66
8.4.20.0040.01218.04
8.4.10.0030.00619.50
8.3.250.0110.00718.93
8.3.240.0110.00916.74
8.3.230.0090.01016.83
8.3.220.0040.00417.19
8.3.210.0110.00716.72
8.3.200.0050.00416.93
8.3.190.0040.00417.15
8.3.180.0100.00916.85
8.3.170.0070.00718.79
8.3.160.0070.01120.93
8.3.150.0150.00318.41
8.3.140.0180.00017.21
8.3.130.0080.00018.54
8.3.120.0110.00818.86
8.3.110.0030.00618.60
8.3.100.0120.00316.50
8.3.90.0070.00726.77
8.3.80.0080.00418.55
8.3.70.0090.00616.63
8.3.60.0070.01418.55
8.3.50.0070.01118.79
8.3.40.0070.00722.22
8.3.30.0110.00421.86
8.3.20.0040.00424.18
8.3.10.0000.00724.66
8.3.00.0140.00928.09
8.2.290.0100.00920.64
8.2.280.0120.00718.33
8.2.270.0070.01117.19
8.2.260.0040.00420.43
8.2.250.0000.00916.70
8.2.240.0160.00017.14
8.2.230.0050.00320.94
8.2.220.0080.00424.06
8.2.210.0060.00926.77
8.2.200.0080.00416.50
8.2.190.0150.00016.58
8.2.180.0040.01116.73
8.2.170.0120.00319.02
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0060.00324.66
8.2.130.0120.00928.09
8.2.120.0100.01128.09
8.2.110.0120.01028.09
8.2.100.0080.00728.09
8.2.90.0140.00528.09
8.2.80.0160.00628.09
8.2.70.0100.00728.09
8.2.60.0160.00328.09
8.2.50.0120.00628.09
8.2.40.0110.00528.09
8.2.30.0060.00828.09
8.2.20.0080.00528.09
8.2.10.0040.01028.09
8.2.00.0050.00628.09
8.1.330.0090.00922.08
8.1.320.0150.00516.50
8.1.310.0030.01618.32
8.1.300.0130.00618.20
8.1.290.0090.00030.84
8.1.280.0140.00725.92
8.1.270.0060.00323.91
8.1.260.0050.00528.09
8.1.250.0070.00428.09
8.1.240.0100.00428.09
8.1.230.0040.00528.09
8.1.220.0090.00328.09
8.1.210.0070.00628.09
8.1.200.0100.00128.09
8.1.190.0060.00428.09
8.1.180.0050.00428.09
8.1.170.0090.00428.09
8.1.160.0080.00628.09
8.1.150.0030.00828.09
8.1.140.0050.00528.09
8.1.130.0030.00828.09
8.1.120.0050.00428.09
8.1.110.0020.00728.09
8.1.100.0040.00428.09
8.1.90.0060.00428.09
8.1.80.0060.00428.09
8.1.70.0050.00528.09
8.1.60.0070.00428.09
8.1.50.0070.00128.09
8.1.40.0040.00528.09
8.1.30.0070.00328.09
8.1.20.0060.00328.09
8.1.10.0070.00328.09
8.1.00.0070.00328.09

preferences:
50.88 ms | 403 KiB | 5 Q