3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { public string $p { set(string|A|null $value) { $this->p = (string) $value; } get => $this-p . ' more'; } } class A { function __toString() { return 'abc'; } } $x = new X; $x->p = new A;

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.90.0090.00816.64
8.5.80.0050.00316.81
8.5.70.0120.00616.74
8.5.60.0070.00616.70
8.4.240.0040.00519.53
8.4.230.0150.00619.51
8.4.220.0050.00719.34
8.4.210.0050.00419.56
8.4.90.0080.00819.55
8.3.330.0080.01318.45
8.3.320.0110.00820.23
8.3.310.0080.00218.50
8.3.180.0050.00418.61
8.3.50.0070.00218.60
8.2.320.0120.00918.11
8.2.310.0050.00319.81

preferences:
50.29 ms | 540 KiB | 5 Q