3v4l.org

run code in 500+ PHP versions simultaneously
<?php class ComplicatedConstructor { public function __construct( public readonly int $integer, public readonly float $float, public readonly bool $boolean, public readonly string $string, private ?\Closure $closure = null, public readonly float|string|null $optional = 'optional', ) {} } $outOfOrderArray = [ 'optional' => 'The optional', 'string' => 'The string', 'float' => (float) '42.5', 'integer' => 9001, 'boolean' => !true, ]; var_dump(new ComplicatedConstructor(...$outOfOrderArray));

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.70.0060.00718.67
8.5.60.0170.00716.53
8.5.50.0120.00818.21
8.5.30.0190.00616.64
8.4.220.0130.01119.55
8.4.210.0090.00521.38
8.4.90.0110.01019.60
8.4.60.0210.00617.66
8.3.310.0270.01219.29
8.3.180.0040.00518.58
8.3.50.0100.00718.63
8.3.20.0100.00717.86
8.2.310.0110.01118.11
8.2.70.0140.00817.73
8.2.00.0150.00719.47
8.1.340.0210.00717.50
8.1.250.0210.01019.19
8.1.00.0160.00717.49
8.0.300.0240.00816.85
8.0.60.0210.00818.41
7.4.330.0120.00516.65
7.4.20.0270.00316.08

preferences:
32.63 ms | 580 KiB | 5 Q