3v4l.org

run code in 300+ PHP versions simultaneously
<?php class class_a { public function __construct( public readonly string $foo, ) {} } class class_b extends class_a { public function __construct( string $foo, public readonly string $bar, ) { parent::__construct($foo); // no really needed here. } } class class_c { public function __construct( public readonly string $foo, public readonly string $bar, ) { } } $b = new class_b('foo', 'bar'); $c = new class_c('foo', 'bar'); var_dump(serialize($b), serialize($c));

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.30.0100.00620.05
8.5.20.0100.00720.00
8.5.10.0110.00620.12
8.5.00.0120.00819.82
8.4.180.0100.01219.64
8.4.170.0090.01320.45
8.4.160.0130.01123.93
8.4.150.0070.00616.80
8.4.140.0130.00817.24
8.4.130.0100.00817.70
8.4.120.0090.00220.51
8.4.110.0040.00619.06
8.4.100.0060.00318.59
8.4.90.0120.00720.50
8.4.80.0130.00718.82
8.4.70.0050.00319.02
8.4.60.0110.00419.06
8.4.50.0120.01018.64
8.4.40.0130.00619.27
8.4.30.0120.00018.57
8.4.20.0120.00919.64
8.4.10.0090.00020.46
8.3.300.0100.01120.83
8.3.290.0180.00820.75
8.3.280.0130.00818.19
8.3.270.0110.00916.70
8.3.260.0110.00516.71
8.3.250.0060.00318.95
8.3.240.0090.01018.30
8.3.230.0080.00816.71
8.3.220.0100.00818.98
8.3.210.0080.01216.63
8.3.200.0060.00316.80
8.3.190.0130.00517.13
8.3.180.0110.00818.75
8.3.170.0120.00916.44
8.3.160.0090.00017.13
8.3.150.0190.00017.11
8.3.140.0040.00418.79
8.3.130.0030.00618.36
8.3.120.0090.00018.96
8.3.110.0000.00922.58
8.3.100.0030.00622.58
8.3.90.0110.00422.58
8.3.50.0000.00822.58
8.2.300.0130.00822.09
8.2.290.0130.00720.57
8.2.280.0090.01018.75
8.2.270.0110.00716.50
8.2.260.0000.00816.36
8.2.250.0040.00416.52
8.2.240.0060.01217.21
8.2.230.0060.00322.58
8.2.220.0030.00722.58
8.2.210.0050.00322.58
8.1.340.0050.00517.43
8.1.330.0110.00815.98
8.1.320.0090.01015.93
8.1.310.0090.00916.17
8.1.300.0190.00020.37
8.1.40.0170.00717.51
8.1.30.0160.01117.54
8.1.20.0220.00417.62
8.1.10.0190.00817.47
8.1.00.0190.01017.46
8.0.170.0060.00316.85
8.0.160.0120.00916.81
8.0.150.0150.00616.78
8.0.140.0200.00316.78
8.0.130.0190.00516.82
8.0.120.0220.00016.83
8.0.110.0190.00016.84
8.0.100.0130.01016.71
8.0.90.0170.00516.74
8.0.80.0230.00016.93
8.0.70.0180.00516.72
8.0.60.0140.00916.85
8.0.50.0140.00916.84
8.0.30.0210.00316.74
8.0.20.0230.00016.91
8.0.10.0130.01016.90
7.4.280.0050.00616.35
7.4.270.0170.00816.33
7.4.260.0160.00816.32
7.4.250.0260.00016.36
7.4.240.0170.00616.31
7.4.230.0210.00616.41
7.4.220.0210.00316.34
7.4.210.0190.00216.40
7.4.200.0180.00516.41
7.4.190.0140.00916.38
7.4.180.0150.00616.54
7.4.160.0200.00316.28
7.4.150.0230.00016.26
7.4.140.0130.00616.26
7.4.130.0160.00616.07
7.4.120.0110.00716.15
7.4.110.0160.00816.30
7.4.100.0220.00016.34
7.4.90.0150.00816.32
7.4.80.0120.00916.21
7.4.70.0200.00016.21
7.4.60.0150.00616.09
7.4.50.0160.00616.17
7.4.40.0130.00816.14
7.4.30.0190.00016.32
7.4.20.0180.00316.17
7.4.10.0110.00816.20
7.4.00.0120.00916.28

preferences:
79.61 ms | 944 KiB | 5 Q