3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** @param array{foo: string} $strArr */ function bar(array $strArr): string { $strArr["foo"] .= "bar"; return $strArr["foo"]; } 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. bar($this->stuff); 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"]);

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.0100.01018.49
8.5.00.0150.00619.81
8.4.160.0120.01019.57
8.4.150.0030.00014.05
8.4.140.0110.01117.57
8.4.130.0130.00718.52
8.4.120.0060.00324.06
8.4.110.0110.00918.73
8.4.100.0060.01118.88
8.4.90.0090.01120.44
8.4.80.0130.00718.95
8.4.70.0110.00418.83
8.4.60.0080.00219.08
8.4.50.0120.00818.85
8.4.40.0120.00917.46
8.4.30.0030.01120.58
8.4.20.0130.00617.68
8.4.10.0070.01023.57
8.3.280.0090.01218.31
8.3.270.0150.00516.53
8.3.260.0110.00816.54
8.3.250.0110.00719.04
8.3.240.0130.00617.26
8.3.230.0140.00516.46
8.3.220.0090.01018.98
8.3.210.0090.01016.45
8.3.200.0060.00316.84
8.3.190.0080.00720.55
8.3.180.0070.01118.74
8.3.170.0170.00016.75
8.3.160.0000.01419.05
8.3.150.0140.00416.66
8.3.140.0070.00718.73
8.3.130.0080.00018.16
8.3.120.0000.00919.11
8.3.110.0090.00020.94
8.3.100.0000.00924.06
8.3.90.0130.00726.77
8.3.80.0030.00618.31
8.3.70.0120.00316.58
8.3.60.0090.00618.54
8.3.50.0180.00020.43
8.3.40.0130.00320.29
8.3.30.0090.00618.94
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0070.00220.59
8.2.280.0120.00718.19
8.2.270.0060.01316.79
8.2.260.0110.00716.39
8.2.250.0050.00316.76
8.2.240.0060.00316.99
8.2.230.0050.00322.58
8.2.220.0030.00637.54
8.2.210.0120.00626.77
8.2.200.0030.00616.50
8.2.190.0060.00916.58
8.2.180.0110.00725.92
8.2.170.0110.01118.96
8.2.160.0070.00722.96
8.2.150.0000.00725.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00719.68
8.2.110.0090.00022.17
8.2.100.0040.00817.84
8.2.90.0000.00817.75
8.2.80.0050.00318.61
8.2.70.0030.00517.50
8.2.60.0050.00317.50
8.2.50.0000.00817.98
8.2.40.0040.00418.22
8.2.30.0040.00418.07
8.2.20.0070.00020.31
8.2.10.0040.00417.93
8.2.00.0040.00419.26
8.1.330.0100.01021.88
8.1.320.0080.01218.54
8.1.310.0070.01116.22
8.1.300.0060.00318.59
8.1.290.0030.00730.84
8.1.280.0110.00725.92
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0100.00022.05
8.1.230.0070.00419.15
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0050.00317.35
8.1.190.0030.00517.25
8.1.180.0050.00318.10
8.1.170.0080.00017.62
8.1.160.0000.00718.83
8.1.150.0030.00518.58
8.1.140.0040.00417.34
8.1.130.0040.00417.42
8.1.120.0070.00017.28
8.1.110.0060.00317.39
8.1.100.0040.00417.35
8.1.90.0060.00317.38
8.1.80.0040.00417.45
8.1.70.0000.00717.41
8.1.60.0060.00617.45
8.1.50.0120.00017.41
8.1.40.0070.00717.51
8.1.30.0140.00617.66
8.1.20.0120.00517.57
8.1.10.0180.00017.48
8.1.00.0140.00417.38
8.0.300.0040.00419.66
8.0.290.0000.00716.63
8.0.280.0000.00718.38
8.0.270.0040.00416.77
8.0.260.0000.00716.68
8.0.250.0000.00616.73
8.0.240.0040.00416.87
8.0.230.0070.00016.76
8.0.220.0030.00316.80
8.0.210.0000.00716.79
8.0.200.0000.00716.89
8.0.190.0100.00516.70
8.0.180.0110.00316.66
8.0.170.0090.00516.78
8.0.160.0090.00616.67
8.0.150.0130.00216.73
8.0.140.0150.00416.77
8.0.130.0110.00616.68
8.0.120.0090.00616.80
8.0.110.0120.00316.69
8.0.100.0100.00516.72
8.0.90.0000.01416.80
8.0.80.0050.01016.71
8.0.70.0100.00516.77
8.0.60.0040.00816.77
8.0.50.0030.00916.75
8.0.30.0070.00416.76
8.0.20.0120.00016.94
8.0.10.0100.00616.94
7.4.330.0000.00615.55
7.4.320.0070.00016.39
7.4.300.0040.00416.54
7.4.290.0120.00016.49
7.4.280.0090.00616.54
7.4.270.0140.00016.48
7.4.260.0040.00716.44
7.4.250.0140.00316.39
7.4.240.0000.01616.36
7.4.230.0140.00016.45
7.4.220.0150.00016.54
7.4.210.0060.00616.39
7.4.200.0060.00616.51
7.4.190.0070.00716.34
7.4.180.0090.00416.47
7.4.160.0140.00016.38
7.4.150.0070.00716.54
7.4.140.0090.00416.34
7.4.130.0110.00416.25
7.4.120.0090.00316.29
7.4.110.0040.00816.36
7.4.100.0060.00616.40
7.4.90.0000.01016.18
7.4.80.0080.00316.36
7.4.70.0050.00816.30
7.4.60.0070.00416.36
7.4.50.0000.01116.25
7.4.40.0120.00316.25
7.4.30.0130.00016.34
7.4.20.0110.00216.26
7.4.10.0060.00616.44
7.4.00.0090.00416.40

preferences:
149.45 ms | 403 KiB | 5 Q