3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class SomeImmutableObject { private $someString; public function __construct(string $value) { $this->someString = $value; } public function getValue(): string { return 'the value is:' . $this->someString . ' - '; } } $one = new SomeImmutableObject('Foo'); echo $one->getValue(); //Foo $one->__construct('Bar'); echo $one->getValue(); //Bar
based on CiHPG

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.0.0beta30.0130.00316.98
8.0.0beta10.0120.00616.68
8.0.0alpha30.0040.01316.57
8.0.0alpha20.0070.01119.39
8.0.0alpha10.0090.01219.39
7.4.100.0070.01316.29
7.4.90.0140.00316.52
7.4.80.0150.00719.39
7.4.70.0120.00619.39
7.4.60.0030.01319.39
7.4.50.0080.01319.39
7.4.40.0110.01119.39
7.4.30.0090.00919.39
7.4.20.0030.01419.39
7.4.10.0100.01019.39
7.4.00.0130.00719.39
7.3.210.0070.01016.57
7.3.200.0110.00819.39
7.3.190.0040.01219.39
7.3.180.0040.01719.39
7.3.170.0070.01419.39
7.3.160.0080.01019.39
7.3.150.0000.01619.39
7.3.140.0150.00319.39
7.3.130.0170.00519.39
7.3.120.0120.01219.39
7.3.110.0070.01619.39
7.3.100.0130.00919.39
7.3.90.0140.00719.39
7.3.80.0160.00319.39
7.3.70.0020.01419.39
7.3.60.0130.00919.39
7.3.50.0160.00819.39
7.3.40.0070.01119.39
7.3.30.0120.00519.39
7.3.20.0070.01119.39
7.3.10.0170.01419.39
7.3.00.0140.01019.39
7.2.330.0140.00316.80
7.2.320.0080.01119.39
7.2.310.0080.01019.39
7.2.300.0000.01819.39
7.2.290.0130.00919.39
7.2.280.0090.00919.39
7.2.270.0030.01419.39
7.2.260.0110.00719.39
7.2.250.0110.01319.39
7.2.240.0060.01819.39
7.2.230.0090.00919.39
7.2.220.0040.01919.39
7.2.210.0130.01019.39
7.2.200.0110.01419.39
7.2.190.0140.00919.39
7.2.180.0110.00819.39
7.2.170.0100.01019.39
7.2.160.0070.01119.39
7.2.150.0090.01319.39
7.2.140.0100.00819.39
7.2.130.0080.01219.39
7.2.120.0060.01519.39
7.2.110.0120.00619.39
7.2.100.0000.01919.39
7.2.90.0210.00319.39
7.2.80.0120.00919.39
7.2.70.0070.01119.39
7.2.60.0110.00819.39
7.2.50.0110.00719.39
7.2.40.0070.01319.39
7.2.30.0140.01119.39
7.2.20.0030.01819.39
7.2.10.0090.00919.39
7.2.00.0090.01519.39