3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} class Foos implements IteratorAggregate { private function __construct(private readonly iterable $foos) {} public static function fromVariadic(Foo ...$foos): self { return new self($foos); } public function getIterator(): \Traversable { return new ArrayIterator($this->foos); } } $foos = Foos::fromVariadic(new Foo, new 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.00.0120.01119.96
8.4.150.0020.00014.05
8.4.140.0110.00917.37
8.4.130.0130.00717.71
8.4.120.0100.00920.65
8.4.110.0120.00922.25
8.4.100.0120.00619.00
8.4.90.0120.00520.45
8.4.80.0060.00418.80
8.4.70.0100.00720.79
8.4.60.0070.00118.85
8.4.50.0150.00717.56
8.4.40.0070.00317.72
8.4.30.0090.00620.53
8.4.20.0160.00317.91
8.4.10.0080.00017.55
8.3.280.0100.01018.37
8.3.270.0100.01216.70
8.3.260.0120.00716.79
8.3.250.0100.01018.81
8.3.240.0080.01016.55
8.3.230.0090.01116.62
8.3.220.0110.00918.78
8.3.210.0030.00518.29
8.3.200.0040.00416.55
8.3.190.0040.00418.90
8.3.180.0120.01016.80
8.3.170.0040.01418.86
8.3.160.0160.00317.17
8.3.150.0060.00317.16
8.3.140.0070.00720.73
8.3.130.0040.00418.55
8.3.120.0040.01220.91
8.3.110.0060.00322.58
8.3.100.0090.00022.58
8.3.90.0130.00622.58
8.3.50.0040.00422.58
8.2.290.0120.00720.33
8.2.280.0040.00418.54
8.2.270.0140.00017.05
8.2.260.0070.01119.00
8.2.250.0040.00716.56
8.2.240.0090.00317.30
8.2.230.0040.00422.58
8.2.220.0090.00022.58
8.2.210.0040.00422.58
8.1.330.0150.00421.92
8.1.320.0110.00216.31
8.1.310.0040.00416.85
8.1.300.0080.00018.05
8.1.30.0080.00217.61

preferences:
50.98 ms | 403 KiB | 5 Q