3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum Status: int { case New = 0; case Pending = 1; } abstract class HistoryRecord { protected function __construct(public readonly Status $status) { } } class NewHistoryRecord extends HistoryRecord { public function __construct() { parent::__construct(Status::New); } } $nhr = new NewHistoryRecord(); var_dump($nhr);

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.1.60.0190.00017.48
8.1.50.0120.00017.48
8.1.40.0110.00017.43
8.1.30.0000.01217.60
8.1.20.0030.01417.59
8.1.10.0080.00417.54
8.1.00.0120.00417.52
8.0.190.0120.00316.55
8.0.180.0130.00316.78
8.0.170.0050.00916.35
8.0.160.0110.00016.62
8.0.150.0040.00816.57
8.0.140.0090.00516.40
8.0.130.0070.00416.39
8.0.120.0110.00016.52
8.0.110.0070.00216.71
8.0.100.0030.00816.17
8.0.90.0000.01016.48
8.0.80.0050.00516.49
8.0.70.0100.00316.21
8.0.60.0000.01216.32
8.0.50.0090.00016.56
8.0.30.0000.00816.55
8.0.20.0080.00316.35
8.0.10.0060.00716.54
7.4.290.0110.00416.42
7.4.280.0110.00616.13
7.4.270.0110.00515.98
7.4.260.0080.00316.04
7.4.250.0100.00715.80
7.4.240.0060.00716.10
7.4.230.0120.00316.07
7.4.220.0080.00816.04
7.4.210.0050.00916.02
7.4.200.0100.00316.25
7.4.190.0120.00015.94
7.4.180.0090.00515.79
7.4.160.0080.00515.93
7.4.150.0090.00315.77
7.4.140.0030.00815.84
7.4.130.0080.00315.59
7.4.120.0090.00015.96
7.4.110.0040.00815.80
7.4.100.0100.00415.84
7.4.90.0100.00315.63
7.4.80.0100.00315.62
7.4.70.0070.00715.90
7.4.60.0080.00515.65
7.4.50.0040.01115.69
7.4.40.0090.00315.78
7.4.30.0080.00515.85
7.4.20.0090.00316.04
7.4.10.0090.00415.90
7.4.00.0110.00315.88

preferences:
145.04 ms | 1394 KiB | 7 Q