3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { private function &getState(): array { static $state = ['counter' => 0]; return $state; } public function count(): int { return $this->getState()['counter']++; } } $x = new Foo(); $y = new Foo(); var_dump($x->count(), $y->count());;

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.30.0120.00618.16
8.5.20.0120.00820.13
8.5.10.0090.00916.55
8.5.00.0150.00719.92
8.4.180.0140.00919.76
8.4.170.0120.01122.15
8.4.160.0130.00922.16
8.4.150.0110.00517.63
8.4.140.0110.01017.36
8.4.130.0100.00717.94
8.4.120.0100.01123.76
8.4.110.0110.01022.41
8.4.100.0040.00517.95
8.4.90.0130.00817.87
8.4.80.0300.00818.89
8.4.70.0380.00817.67
8.4.60.0400.00817.74
8.4.50.0400.00917.75
8.4.40.0420.00817.52
8.4.30.0380.00717.49
8.4.20.0280.00617.59
8.4.10.0320.00817.54
8.3.300.0100.01020.80
8.3.290.0130.00822.55
8.3.280.0140.00720.04
8.3.270.0110.00816.56
8.3.260.0130.00616.54
8.3.250.0120.00819.00
8.3.240.0130.00519.18
8.3.230.0120.00616.61
8.3.220.0240.00618.91
8.3.210.0340.00716.49
8.3.200.0300.00516.54
8.3.190.0320.00616.52
8.3.180.0300.00616.56
8.3.170.0320.00716.37
8.3.160.0320.00716.54
8.3.150.0320.00616.49
8.3.140.0290.00616.60
8.3.130.0290.00616.59
8.3.120.0300.00616.46
8.3.110.0290.00816.43
8.3.100.0340.00716.45
8.3.90.0290.00816.38
8.3.80.0310.00816.50
8.3.70.0320.00816.42
8.3.60.0330.00616.44
8.3.50.0260.00616.55
8.3.40.0300.00517.54
8.3.30.0210.00617.57
8.3.20.0290.00617.44
8.3.10.0250.00717.44
8.3.00.0150.00717.54
8.2.300.0120.00720.23
8.2.290.0060.00320.19
8.2.280.0270.00716.48
8.2.270.0300.00716.59
8.2.260.0330.00616.35
8.2.250.0310.00816.39
8.2.240.0310.00716.42
8.2.230.0290.00716.31
8.2.220.0330.00716.51
8.2.210.0290.00516.37
8.2.200.0260.00516.46
8.2.190.0290.00616.57
8.2.180.0290.00816.41
8.2.170.0300.00817.65
8.2.160.0300.00817.66
8.2.150.0310.00617.60
8.2.140.0330.00617.49
8.2.130.0310.00617.61
8.2.120.0310.00617.59
8.2.110.0290.00617.59
8.2.100.0280.00717.57
8.2.90.0300.00517.63
8.2.80.0330.00717.55
8.2.70.0270.00617.50
8.2.60.0290.00717.53
8.2.50.0310.00717.38
8.2.40.0310.00717.54
8.2.30.0280.00717.53
8.2.20.0330.00717.49
8.2.10.0250.00717.50
8.2.00.0300.00717.54
8.1.340.0130.00820.30

preferences:
73.74 ms | 832 KiB | 5 Q