3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { /** @var array<string, string> */ private array $stuff = ["foo" => "foo"]; /** * @param non-empty-list<string> $param * @return string */ public function foo(array $param) { $arr = &$this->stuff[$param[0]]; // This seems to cause Psalm to blackout. var_dump($this->stuff); /** @var string */ $x = $arr; /** @psalm-trace $x, $arr */; // This trace doesn't work, and $x's type appears to be mixed at this point. /** @psalm-trace $x */ return $x; } } $foo = new Foo(); $foo->foo(["foo"]); $foo->foo(["bar"]);

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.10.0050.00318.76
8.5.00.0110.01120.19
8.4.150.0010.00014.05
8.4.140.0100.01217.61
8.4.130.0130.00718.78
8.4.120.0120.00819.36
8.4.110.0110.00920.57
8.4.100.0120.00817.84
8.4.90.0130.00620.84
8.4.80.0110.00818.92
8.4.70.0110.00719.18
8.4.60.0090.01120.65
8.4.50.0130.00818.71
8.4.40.0060.01717.57
8.4.30.0120.00920.41
8.4.20.0130.00617.96
8.4.10.0030.00623.76
8.3.280.0090.01120.10
8.3.270.0130.00716.34
8.3.260.0120.00816.38
8.3.250.0110.00816.26
8.3.240.0110.00517.36
8.3.230.0120.00716.73
8.3.220.0070.01118.84
8.3.210.0130.00616.52
8.3.200.0040.00516.56
8.3.190.0050.00317.21
8.3.180.0080.01118.89
8.3.170.0030.01217.48
8.3.160.0100.00016.70
8.3.150.0110.00716.76
8.3.140.0140.00716.73
8.3.130.0050.00318.42
8.3.120.0140.00419.23
8.3.110.0040.00416.54
8.3.100.0030.00616.65
8.3.90.0050.00326.77
8.3.80.0100.00016.63
8.3.70.0070.00716.58
8.3.60.0040.01216.50
8.3.50.0140.00420.21
8.3.40.0030.01020.38
8.3.30.0080.00818.90
8.3.20.0050.00224.18
8.3.10.0000.00924.66
8.3.00.0050.00326.16
8.2.290.0090.00316.42
8.2.280.0070.00918.29
8.2.270.0120.00620.75
8.2.260.0070.00717.33
8.2.250.0190.00316.53
8.2.240.0060.00318.23
8.2.230.0050.00320.94
8.2.220.0050.00324.06
8.2.210.0090.00626.77
8.2.200.0040.00418.16
8.2.190.0120.00316.58
8.2.180.0040.01125.92
8.2.170.0170.00318.95
8.2.160.0130.00322.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0080.00326.16
8.2.120.0040.00419.76
8.2.110.0040.00420.52
8.2.100.0090.00317.71
8.2.90.0090.00019.10
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0080.00018.05
8.2.50.0040.00418.07
8.2.40.0000.00718.09
8.2.30.0040.00418.12
8.2.20.0030.00520.49
8.2.10.0000.00718.05
8.2.00.0050.00219.15
8.1.330.0110.00816.07
8.1.320.0110.01017.93
8.1.310.0030.01418.23
8.1.300.0050.00318.09
8.1.290.0060.00330.84
8.1.280.0030.01125.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0070.00420.64
8.1.230.0080.00317.83
8.1.220.0040.00417.74
8.1.210.0000.00918.77
8.1.200.0040.00417.00
8.1.190.0050.00317.13
8.1.180.0040.00418.10
8.1.170.0000.00818.43
8.1.160.0000.00918.78
8.1.150.0030.00618.48
8.1.140.0000.00817.31
8.1.130.0000.00718.88
8.1.120.0030.00517.42
8.1.110.0000.00717.43
8.1.100.0000.00817.39
8.1.90.0040.00417.39
8.1.80.0040.00417.44
8.1.70.0000.00717.39
8.1.60.0040.01417.42
8.1.50.0130.00417.39
8.1.40.0110.00617.51
8.1.30.0090.00917.64
8.1.20.0120.00417.48
8.1.10.0120.00617.45
8.1.00.0050.01117.26
8.0.300.0070.00018.77
8.0.290.0080.00016.58
8.0.280.0030.00318.30
8.0.270.0070.00016.76
8.0.260.0000.00618.29
8.0.250.0030.00316.79
8.0.240.0000.00716.72
8.0.230.0030.00316.79
8.0.220.0000.00816.73
8.0.210.0000.00716.76
8.0.200.0040.00416.90
8.0.190.0040.00416.83
8.0.180.0090.00016.68
8.0.170.0040.00716.79
8.0.160.0000.00916.77
8.0.150.0090.00016.79
8.0.140.0050.00516.79
8.0.130.0050.00516.81
8.0.120.0080.00416.66
8.0.110.0110.00016.78
8.0.100.0110.00316.63
8.0.90.0100.00516.73
8.0.80.0130.00016.65
8.0.70.0000.01316.65
8.0.60.0080.00416.71
8.0.50.0130.00016.71
8.0.30.0080.00416.68
8.0.20.0120.00016.71
8.0.10.0130.00016.89
7.4.330.0000.00515.55
7.4.320.0040.00416.38
7.4.300.0060.00016.37
7.4.290.0150.00016.55
7.4.280.0100.00516.50
7.4.270.0140.00216.45
7.4.260.0120.00416.51
7.4.250.0120.00416.48
7.4.240.0130.00316.39
7.4.230.0100.00616.30
7.4.220.0080.00716.40
7.4.210.0130.00016.43
7.4.200.0100.00516.50
7.4.190.0130.00316.52
7.4.180.0080.00616.40
7.4.160.0080.00516.50
7.4.150.0150.00016.43
7.4.140.0070.00716.32
7.4.130.0110.00316.19
7.4.120.0120.00316.24
7.4.110.0110.00416.29
7.4.100.0090.00616.40
7.4.90.0060.00316.28
7.4.80.0070.00316.25
7.4.70.0080.00516.41
7.4.60.0110.00316.40
7.4.50.0020.00516.30
7.4.40.0060.00016.33
7.4.30.0000.00616.26
7.4.20.0000.00616.46
7.4.10.0000.00616.41
7.4.00.0070.00016.49

preferences:
132.99 ms | 403 KiB | 5 Q