3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum Foo { case Bar; private function &getState(): array { static $state = []; return $state; } public function increment(): void { $this->getState()[$this->name]['count'] ??= 0; ++$this->getState()[$this->name]['count']; } public function getCount(): int { return $this->getState()[$this->name]['count'] ?? 0; } } Foo::Bar->increment(); var_dump( Foo::Bar->getCount());

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.5.00.0120.00920.01
8.4.150.0010.00114.05
8.4.140.0120.01017.48
8.4.130.0030.00617.59
8.4.120.0130.00822.33
8.4.110.0130.00718.79
8.4.100.0110.00917.81
8.4.90.0110.00920.81
8.4.80.0130.00518.91
8.4.70.0080.00117.79
8.4.60.0130.00718.87
8.4.50.0110.00519.56
8.4.40.0090.00324.09
8.4.30.0150.00623.98
8.4.20.0040.01119.35
8.4.10.0100.01019.30
8.3.280.0150.00618.48
8.3.270.0130.00716.40
8.3.260.0130.00616.66
8.3.250.0130.00619.00
8.3.240.0040.00516.60
8.3.230.0120.00716.37
8.3.220.0030.00520.94
8.3.210.0100.00818.32
8.3.200.0050.00716.79
8.3.190.0080.01016.47
8.3.180.0130.00516.60
8.3.170.0110.00717.32
8.3.160.0000.00817.05
8.3.150.0090.00917.20
8.3.140.0040.00418.72
8.3.130.0080.00016.85
8.3.120.0270.00817.02
8.3.110.0380.00516.45
8.3.100.0400.00716.41
8.3.90.0400.00616.30
8.3.80.0350.01316.39
8.3.70.0370.01116.33
8.3.60.0380.00916.38
8.3.50.0340.00516.49
8.3.40.0260.00417.47
8.3.30.0260.00717.41
8.3.20.0240.00317.44
8.3.10.0240.00717.48
8.3.00.0140.00717.48
8.2.290.0080.00217.43
8.2.280.0120.00718.54
8.2.270.0050.00516.63
8.2.260.0070.00017.08
8.2.250.0040.00416.66
8.2.240.0250.01016.49
8.2.230.0220.00816.32
8.2.220.0200.00716.45
8.2.210.0210.00716.54
8.2.200.0240.00516.34
8.2.190.0230.00816.50
8.2.180.0230.00916.36
8.2.170.0290.01217.66
8.2.160.0250.00817.65
8.2.150.0290.00717.61
8.2.140.0320.01017.48
8.2.130.0340.00717.48
8.2.120.0370.00717.36
8.2.110.0360.00817.55
8.2.100.0320.00617.52
8.2.90.0330.00717.49
8.2.80.0360.00617.52
8.2.70.0360.00717.29
8.2.60.0260.00717.38
8.2.50.0270.00717.43
8.2.40.0290.00417.41
8.2.30.0250.00617.47
8.2.20.0260.00917.46
8.2.10.0200.00917.34
8.2.00.0230.01117.38
8.1.330.0080.01216.23
8.1.320.0090.01216.41
8.1.310.0140.00018.68
8.1.300.0330.00515.99
8.1.290.0260.00815.87
8.1.280.0270.00816.02
8.1.270.0350.00817.19
8.1.260.0330.01117.25
8.1.250.0340.01017.18
8.1.240.0300.00717.35
8.1.230.0320.00817.32
8.1.220.0360.00517.24
8.1.210.0330.00817.16
8.1.200.0310.00617.19
8.1.190.0300.00317.18
8.1.180.0330.00617.15
8.1.170.0270.00817.21
8.1.160.0240.01517.08
8.1.150.0250.01017.09
8.1.140.0310.00716.99
8.1.130.0270.01017.08
8.1.120.0220.01317.24
8.1.110.0270.00817.07
8.1.100.0280.00817.17
8.1.90.0310.00717.02
8.1.80.0300.00717.10
8.1.70.0330.00517.10
8.1.60.0350.00817.28
8.1.50.0310.00617.18
8.1.40.0330.00917.27
8.1.30.0320.00817.13
8.1.20.0300.01117.13
8.1.10.0300.00917.16
8.1.00.0280.00617.20

preferences:
29.44 ms | 403 KiB | 5 Q