3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ValidationFailedException extends Exception {} class Yoba { private int $age; public function getAge () : int { return $this->age; } public function setAge (int $age) : void { $this->age = $age; $this->ageValidate(); } public function ageValidate () : bool { if (($this->age > 0) && ($this->age <= 100)) { return true; } throw new ValidationFailedException(); } } $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.0040.00624.06
8.4.110.0110.01118.82
8.4.100.0100.00817.79
8.4.90.0060.00420.61
8.4.80.0080.00820.66
8.4.70.0140.00718.90
8.4.60.0070.00520.36
8.4.50.0120.00419.73
8.4.40.0100.01017.96
8.4.30.0060.01318.77
8.4.20.0140.00717.89
8.4.10.0090.00019.77
8.3.250.0120.00716.90
8.3.240.0120.00617.39
8.3.230.0120.00716.95
8.3.220.0060.00819.08
8.3.210.0070.01116.89
8.3.200.0080.00416.82
8.3.190.0060.00216.73
8.3.180.0120.00716.73
8.3.170.0140.00418.96
8.3.160.0000.01518.71
8.3.150.0100.01018.54
8.3.140.0120.00617.23
8.3.130.0040.00418.54
8.3.120.0080.00318.75
8.3.110.0090.00018.58
8.3.100.0000.00816.88
8.3.90.0070.01116.76
8.3.80.0030.00618.68
8.3.70.0150.00416.63
8.3.60.0210.00018.55
8.3.50.0040.01116.77
8.3.40.0120.00320.21
8.3.30.0070.00721.91
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0200.00728.09
8.2.290.0120.00717.02
8.2.280.0120.00718.43
8.2.270.0110.00717.05
8.2.260.0110.00718.72
8.2.250.0090.00918.56
8.2.240.0120.00418.96
8.2.230.0130.00320.94
8.2.220.0030.00724.06
8.2.210.0040.00426.77
8.2.200.0060.00318.54
8.2.190.0120.00316.75
8.2.180.0040.01516.75
8.2.170.0130.00318.89
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0060.00624.66
8.2.130.0120.01228.09
8.2.120.0120.00828.09
8.2.110.0240.00028.09
8.2.100.0180.00428.09
8.2.90.0240.01028.09
8.2.80.0220.00728.09
8.2.70.0150.00428.09
8.2.60.0040.00428.09
8.2.50.0060.00328.09
8.2.40.0220.00728.09
8.2.30.0080.00328.09
8.2.20.0060.00328.09
8.2.10.0100.00028.09
8.2.00.0100.00028.09
8.1.330.0100.00916.27
8.1.320.0030.00715.99
8.1.310.0110.00418.36
8.1.300.0060.01016.32
8.1.290.0100.00018.88
8.1.280.0100.01025.92
8.1.270.0090.00023.82
8.1.260.0130.00828.09
8.1.250.0220.00028.09
8.1.240.0060.01028.09
8.1.230.0160.00828.09
8.1.220.0100.00728.09
8.1.210.0230.00328.09
8.1.200.0130.01328.09
8.1.190.0040.00828.09
8.1.180.0080.00328.09
8.1.170.0130.00328.09
8.1.160.0090.00528.09
8.1.150.0000.00928.09
8.1.140.0100.00028.09
8.1.130.0090.00628.09
8.1.120.0060.00328.09
8.1.110.0130.00028.09
8.1.100.0030.00628.09
8.1.90.0100.00328.09
8.1.80.0060.00628.09
8.1.70.0000.00928.09
8.1.60.0100.00528.09
8.1.50.0070.00228.09
8.1.40.0000.01028.09
8.1.30.0060.00628.09
8.1.20.0060.00328.09
8.1.10.0150.00028.09
8.1.00.0110.00328.09

preferences:
33.53 ms | 403 KiB | 5 Q