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.90.0070.00916.84
8.5.80.0050.00316.70
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.240.0140.00919.57
8.4.230.0090.01022.05
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.330.0130.00818.59
8.3.320.0140.00618.55
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.320.0110.00818.14
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:
55.14 ms | 609 KiB | 5 Q