3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Errors extends ArrayObject {} class Foo { private Errors $errors; public function __construct() { $this->errors = new Errors; } public function generateErrors(): void { $this->errors->append('Test error'); } public function printErrors(): void { foreach($this->errors as $error) { echo $error . PHP_EOL; } } } $foo = new Foo; $foo->generateErrors(); $foo->printErrors();

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.0050.00424.05
8.4.110.0110.00822.52
8.4.100.0140.00720.41
8.4.90.0120.00618.60
8.4.80.0120.00817.71
8.4.70.0140.00817.88
8.4.60.0060.00417.66
8.4.50.0120.00919.61
8.4.40.0170.00317.65
8.4.30.0140.00718.89
8.4.20.0070.01419.77
8.4.10.0040.00419.23
8.3.250.0120.00719.04
8.3.240.0110.00817.02
8.3.230.0050.00316.73
8.3.220.0110.00718.86
8.3.210.0060.00216.49
8.3.200.0120.00816.27
8.3.190.0110.00918.38
8.3.180.0120.00816.54
8.3.170.0060.01218.83
8.3.160.0080.00720.73
8.3.150.0110.00718.55
8.3.140.0070.00718.18
8.3.130.0090.00016.54
8.3.120.0100.01020.83
8.3.110.0000.00820.94
8.3.100.0030.00624.06
8.3.90.0060.01226.77
8.3.80.0000.01217.97
8.3.70.0100.01318.56
8.3.60.0030.01316.75
8.3.50.0140.00716.56
8.3.40.0060.00920.12
8.3.30.0110.00721.78
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0080.00028.09
8.2.290.0070.00420.51
8.2.280.0090.01018.54
8.2.270.0070.00717.25
8.2.260.0080.00020.11
8.2.250.0080.00018.34
8.2.240.0040.01217.13
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0090.00626.77
8.2.200.0050.00518.41
8.2.190.0070.01016.70
8.2.180.0070.01118.29
8.2.170.0030.01919.08
8.2.160.0110.00422.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0030.00628.09
8.2.120.0080.00028.09
8.2.110.0090.00028.09
8.2.100.0030.00628.09
8.2.90.0030.00628.09
8.2.80.0080.00028.09
8.2.70.0060.00328.09
8.2.60.0060.00328.09
8.2.50.0000.00928.09
8.2.40.0090.00028.09
8.2.30.0000.00828.09
8.2.20.0060.00328.09
8.2.10.0030.00628.09
8.2.00.0060.00328.09
8.1.330.0110.00822.19
8.1.320.0090.00916.01
8.1.310.0070.00716.68
8.1.300.0100.00617.71
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0080.00023.96
8.1.260.0000.00828.09
8.1.250.0030.00628.09
8.1.240.0040.00428.09
8.1.230.0050.00528.09
8.1.220.0060.00328.09
8.1.210.0080.00028.09
8.1.200.0030.00628.09
8.1.190.0090.00028.09
8.1.180.0080.00028.09
8.1.170.0050.00528.09
8.1.160.0060.00328.09
8.1.150.0060.00328.09
8.1.140.0030.00628.09
8.1.130.0030.00628.09
8.1.120.0040.00428.09
8.1.110.0040.00428.09
8.1.100.0000.00828.09
8.1.90.0000.00828.09
8.1.80.0040.00428.09
8.1.70.0090.00028.09
8.1.60.0090.00028.09
8.1.50.0030.00628.09
8.1.40.0030.00528.09
8.1.30.0000.00828.09
8.1.20.0030.00628.09
8.1.10.0030.00628.09
8.1.00.0030.00528.09

preferences:
48.62 ms | 403 KiB | 5 Q