3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ManagerSupervisorV1 { private string $name; private float $salary; public function __construct(string $name = 'Руководитель менеджеров', float $salary = 1.5) { $this->name = $name; $this->salary = $salary; } } var_dump(new ManagerSupervisorV1); class ManagerSupervisorV2 { private string $name = 'Руководитель менеджеров'; private float $salary = 1.5; public function __construct(string $name = null, float $salary = null) { $this->name = $this->name ?: $name; $this->salary = $this->salary ?: $salary; } } var_dump(new ManagerSupervisorV2); class ManagerSupervisorV3 { public function __construct( private string $name = 'Руководитель менеджеров', private float $salary = 1.5, ) {} } var_dump(new ManagerSupervisorV3);

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.4.120.0100.01120.83
8.4.110.0050.00420.39
8.4.100.0110.01117.78
8.4.90.0080.01020.61
8.4.80.0130.00720.57
8.4.70.0100.00820.39
8.4.60.0110.00620.59
8.4.50.0120.00920.31
8.4.40.0130.00717.78
8.4.30.0130.00718.80
8.4.20.0070.01419.69
8.4.10.0030.00619.60
8.3.250.0120.00721.07
8.3.240.0100.01116.56
8.3.230.0080.00216.75
8.3.220.0130.00520.63
8.3.210.0140.00516.28
8.3.200.0070.00216.84
8.3.190.0110.00816.98
8.3.180.0100.01118.82
8.3.170.0070.01117.12
8.3.160.0090.00916.65
8.3.150.0090.00916.63
8.3.140.0070.01118.80
8.3.130.0090.00616.55
8.3.120.0160.00019.02
8.3.110.0080.00020.94
8.3.100.0090.00016.73
8.3.90.0070.00326.77
8.3.80.0200.00326.77
8.3.70.0320.00026.77
8.3.60.0280.00426.77
8.3.50.0250.00426.77
8.3.40.0320.00326.77
8.3.30.0320.00626.77
8.3.20.0350.00326.77
8.3.10.0280.00826.77
8.3.00.0350.00926.77
8.2.290.0120.00417.03
8.2.280.0100.00918.43
8.2.270.0090.00916.36
8.2.260.0080.00017.38
8.2.250.0040.00416.48
8.2.240.0080.00018.93
8.2.230.0000.00822.58
8.2.220.0060.00324.06
8.2.210.0190.01926.77
8.2.200.0360.01126.77
8.2.190.0250.01726.77
8.2.180.0290.00726.77
8.2.170.0290.00626.77
8.2.160.0360.00726.77
8.2.150.0400.00426.77
8.2.140.0430.00026.77
8.2.130.0350.01026.77
8.2.120.0380.00626.77
8.2.110.0450.00026.77
8.2.100.0350.01226.77
8.2.90.0280.01626.77
8.2.80.0250.01826.77
8.2.70.0260.01826.77
8.2.60.0410.00326.77
8.2.50.0400.00326.77
8.2.40.0270.00526.77
8.2.30.0220.01526.77
8.2.20.0320.00326.77
8.2.10.0310.01026.77
8.2.00.0350.00426.77
8.1.330.0100.00916.20
8.1.320.0100.01023.64
8.1.310.0050.00516.78
8.1.300.0060.00318.09
8.1.290.0420.00526.77
8.1.280.0350.00926.77
8.1.270.0340.01426.77
8.1.260.0260.01026.77
8.1.250.0310.01326.77
8.1.240.0320.00626.77
8.1.230.0190.01926.77
8.1.220.0300.01326.77
8.1.210.0270.01226.77
8.1.200.0170.00826.77
8.1.190.0150.00326.77
8.1.180.0360.00326.77
8.1.170.0280.00626.77
8.1.160.0260.01026.77
8.1.150.0190.00026.77
8.1.140.0280.01026.77
8.1.130.0380.00026.77
8.1.120.0240.01026.77
8.1.110.0540.00826.77
8.1.100.0300.00926.77
8.1.90.0330.00626.77
8.1.80.0290.00326.77
8.1.70.0230.00926.77
8.1.60.0420.00026.77
8.1.50.0320.01126.77
8.1.40.0340.00326.77
8.1.30.0200.00026.77
8.1.20.0200.00426.77
8.1.10.0120.00926.77
8.1.00.0160.00826.77

preferences:
27.97 ms | 403 KiB | 5 Q