3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class User { public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; public function __construct(public string $username, public string $status = self::STATUS_ACTIVE) { } } class Admin extends User { // ... public function printStatus() { // vous pouvez accéder au status comme si la propriété appartenait à Admin :) echo $this->status; } } $admin = new Admin('Lily'); $admin->printStatus();

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.0110.00919.84
8.4.150.0010.00114.05
8.4.140.0120.00917.68
8.4.130.0300.00717.56
8.4.120.0140.00719.90
8.4.110.0170.00422.46
8.4.100.0140.00717.55
8.4.90.0140.00718.54
8.4.80.0160.00918.69
8.4.70.0220.00918.31
8.4.60.0300.00918.18
8.4.50.0280.01018.16
8.4.40.0380.00817.90
8.4.30.0350.01017.44
8.4.20.0240.01117.60
8.4.10.0370.00617.52
8.3.280.0130.00718.39
8.3.270.0090.01116.58
8.3.260.0130.00616.45
8.3.250.0110.00618.94
8.3.240.0080.01116.85
8.3.230.0100.00916.34
8.3.220.0120.00517.13
8.3.210.0190.01017.31
8.3.200.0270.00816.58
8.3.190.0300.00816.80
8.3.180.0270.01016.57
8.3.170.0250.00817.15
8.3.160.0320.00617.10
8.3.150.0250.00716.81
8.3.140.0280.00816.60
8.3.130.0290.00716.78
8.3.120.0270.00816.91
8.3.110.0280.00816.48
8.3.100.0310.00817.25
8.3.90.0320.00617.52
8.3.80.0330.00716.71
8.3.70.0310.00716.64
8.3.60.0350.00716.62
8.3.50.0340.00716.70
8.3.40.0310.00817.61
8.3.30.0280.00717.61
8.3.20.0290.00718.09
8.3.10.0270.00718.11
8.3.00.0170.00818.79
8.2.290.0100.00620.39
8.2.280.0270.00617.02
8.2.270.0280.00816.75
8.2.260.0270.00916.64
8.2.250.0270.00816.55
8.2.240.0260.00816.70
8.2.230.0300.00716.90
8.2.220.0280.00818.65
8.2.210.0260.00817.42
8.2.200.0260.00716.73
8.2.190.0260.00516.87
8.2.180.0280.00617.48
8.2.170.0340.00718.18
8.2.160.0270.01018.11
8.2.150.0290.00818.28
8.2.140.0320.00518.17
8.2.130.0310.00818.26
8.2.120.0280.00817.78
8.2.110.0260.00718.19
8.2.100.0240.00717.83
8.2.90.0230.00917.87
8.2.80.0280.00617.48
8.2.70.0230.00639.29
8.2.60.0280.00717.51
8.2.50.0190.00618.04
8.2.40.0230.00817.81
8.2.30.0270.00517.63
8.2.20.0270.00617.48
8.2.10.0240.00717.60
8.2.00.0210.00717.64
8.1.330.0100.00820.13
8.1.320.0230.00716.25
8.1.310.0280.00716.31
8.1.300.0300.00816.30
8.1.290.0280.00817.63
8.1.280.0270.00917.25
8.1.270.0280.00617.94
8.1.260.0260.00618.20
8.1.250.0260.00818.36
8.1.240.0250.00817.93
8.1.230.0260.00617.65
8.1.220.0270.00617.36
8.1.210.0260.00617.44
8.1.200.0210.00917.20
8.1.190.0230.00717.09
8.1.180.0230.00717.23
8.1.170.0240.00717.30
8.1.160.0220.00717.32
8.1.150.0200.00817.31
8.1.140.0210.00617.29
8.1.130.0190.00717.33
8.1.120.0170.00717.70
8.1.110.0190.00617.47
8.1.100.0170.00617.48
8.1.90.0160.00717.43
8.1.80.0150.00517.40
8.1.70.0150.00517.40
8.1.60.0170.00617.57
8.1.50.0160.00517.50
8.1.40.0160.00617.57
8.1.30.0170.00617.65
8.1.20.0160.00617.61
8.1.10.0160.00617.56
8.1.00.0150.00717.53
8.0.300.0240.00917.00
8.0.290.0270.00716.71
8.0.280.0250.00516.88
8.0.270.0240.00716.83
8.0.260.0220.00816.79
8.0.250.0210.00517.06
8.0.240.0200.00716.97
8.0.230.0190.00716.96
8.0.220.0180.00516.84
8.0.210.0170.00516.83
8.0.200.0150.00716.85
8.0.190.0160.00516.84
8.0.180.0150.00516.83
8.0.170.0160.00416.85
8.0.160.0160.00516.89
8.0.150.0150.00616.77
8.0.140.0160.00616.78
8.0.130.0160.00516.70
8.0.120.0150.00516.39
8.0.110.0130.00616.71
8.0.100.0140.00616.69
8.0.90.0130.00616.71
8.0.80.0140.00516.70
8.0.70.0140.00516.67
8.0.60.0140.00516.68
8.0.50.0130.00616.66
8.0.30.0140.00516.70
8.0.20.0140.00416.78
8.0.10.0130.00616.84
8.0.00.0110.00516.94
7.4.330.0160.00516.35
7.4.320.0150.00616.51
7.4.300.0150.00516.46
7.4.290.0130.00516.43
7.4.280.0150.00516.44
7.4.270.0150.00616.43
7.4.260.0150.00516.37
7.4.250.0140.00616.35
7.4.240.0140.00416.33
7.4.230.0140.00516.38
7.4.220.0140.00416.33
7.4.210.0110.00516.32
7.4.200.0100.00616.35
7.4.190.0100.00516.36
7.4.180.0110.00516.42
7.4.160.0110.00516.37
7.4.150.0110.00516.30
7.4.140.0110.00516.35
7.4.130.0110.00516.23
7.4.120.0120.00416.20
7.4.110.0110.00516.21
7.4.100.0130.00416.30
7.4.90.0110.00516.23
7.4.80.0110.00516.21
7.4.70.0110.00516.21
7.4.60.0110.00516.20
7.4.50.0110.00416.14
7.4.40.0110.00516.11
7.4.30.0110.00416.20
7.4.20.0110.00416.21
7.4.10.0100.00516.19
7.4.00.0110.00516.24
7.3.330.0140.00516.32
7.3.320.0130.00616.08
7.3.310.0150.00516.20
7.3.300.0140.00516.16
7.3.290.0140.00416.18
7.3.280.0140.00416.16
7.3.270.0140.00416.15
7.3.260.0140.00416.19
7.3.250.0130.00516.18
7.3.240.0120.00616.18
7.3.230.0140.00516.18
7.3.220.0140.00416.11
7.3.210.0140.00516.11
7.3.200.0150.00416.11
7.3.190.0130.00516.10
7.3.180.0130.00516.09
7.3.170.0130.00516.10
7.3.160.0140.00416.09
7.3.150.0140.00516.08
7.3.140.0140.00516.09
7.3.130.0140.00416.18
7.3.120.0140.00416.11
7.3.110.0140.00516.01
7.3.100.0130.00516.05
7.3.90.0140.00416.31
7.3.80.0130.00516.09
7.3.70.0130.00516.15
7.3.60.0130.00516.22
7.3.50.0140.00516.25
7.3.40.0130.00516.21
7.3.30.0130.00516.22
7.3.20.0150.00517.54
7.3.10.0150.00517.47
7.3.00.0150.00517.52

preferences:
29.54 ms | 403 KiB | 5 Q