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 static $nombreUtilisateursInitialisés = 0; public function __construct(public string $username, public string $status = self::STATUS_ACTIVE) { } } class Admin extends User { public static $nombreAdminInitialisés = 0; public static function nouvelleInitialisation() { self::$nombreAdminInitialisés++; parent::$nombreUtilisateursInitialisés++; } } Admin::nouvelleInitialisation(); var_dump(Admin::$nombreAdminInitialisés, Admin::$nombreUtilisateursInitialisés, User::$nombreUtilisateursInitialisés); var_dump(User::$nombreAdminInitialisés); // ceci ne marche pas.

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.20.0050.00318.84
8.4.10.0110.00317.81
8.3.150.0090.00920.82
8.3.140.0140.00316.84
8.3.130.0240.00816.92
8.3.120.0290.00416.94
8.3.110.0240.00717.22
8.3.100.0300.00421.56
8.3.90.0300.00617.77
8.3.80.0310.00616.48
8.3.70.0320.00416.53
8.3.60.0240.00818.69
8.3.50.0260.00716.67
8.3.40.0250.00817.92
8.3.30.0210.00817.75
8.3.20.0260.00518.70
8.3.10.0180.00919.30
8.3.00.0160.00818.76
8.2.260.0100.00918.50
8.2.250.0250.00616.71
8.2.240.0250.00716.83
8.2.230.0240.00817.24
8.2.220.0250.00819.25
8.2.210.0280.00617.73
8.2.200.0250.00816.63
8.2.190.0270.00616.65
8.2.180.0240.00917.74
8.2.170.0270.00817.97
8.2.160.0280.00718.43
8.2.150.0260.00718.57
8.2.140.0230.00819.00
8.2.130.0220.00819.77
8.2.120.0280.00518.42
8.2.110.0280.00618.55
8.2.100.0230.00518.10
8.2.90.0240.00617.94
8.2.80.0220.00618.17
8.2.70.0150.00641.07
8.2.60.0230.00618.01
8.2.50.0120.00718.31
8.2.40.0150.00618.00
8.2.30.0200.00617.88
8.2.20.0210.00417.82
8.2.10.0150.00717.81
8.2.00.0170.00718.09
8.1.310.0130.00716.25
8.1.300.0280.00516.44
8.1.290.0240.00716.51
8.1.280.0240.00917.43
8.1.270.0210.00819.72
8.1.260.0190.00819.51
8.1.250.0230.00719.39
8.1.240.0190.00818.25
8.1.230.0220.00717.95
8.1.220.0210.00717.74
8.1.210.0210.00617.73
8.1.200.0220.00417.61
8.1.190.0210.00617.51
8.1.180.0170.00717.83
8.1.170.0180.00617.84
8.1.160.0200.00617.77
8.1.150.0190.00617.80
8.1.140.0200.00617.78
8.1.130.0150.00618.03
8.1.120.0170.00517.61
8.1.110.0150.00617.57
8.1.100.0140.00617.60
8.1.90.0150.00517.53
8.1.80.0120.00617.56
8.1.70.0130.00517.45
8.1.60.0150.00617.67
8.1.50.0150.00617.58
8.1.40.0130.00617.61
8.1.30.0140.00617.65
8.1.20.0150.00617.69
8.1.10.0140.00617.62
8.1.00.0150.00517.53
8.0.300.0210.00617.51
8.0.290.0240.00616.82
8.0.280.0190.00717.53
8.0.270.0200.00517.03
8.0.260.0180.00617.12
8.0.250.0190.00517.18
8.0.240.0160.00517.13
8.0.230.0150.00717.14
8.0.220.0150.00717.04
8.0.210.0150.00617.07
8.0.200.0140.00617.08
8.0.190.0150.00617.14
8.0.180.0130.00717.12
8.0.170.0150.00617.03
8.0.160.0140.00617.11
8.0.150.0150.00516.99
8.0.140.0140.00616.93
8.0.130.0140.00416.84
8.0.120.0130.00516.46
8.0.110.0110.00616.50
8.0.100.0110.00616.48
8.0.90.0110.00616.49
8.0.80.0110.00516.48
8.0.70.0120.00516.48
8.0.60.0130.00516.47
8.0.50.0120.00516.48
8.0.30.0120.00516.52
8.0.20.0110.00516.59
8.0.10.0110.00516.60
8.0.00.0090.00516.74
7.4.330.0150.00416.94
7.4.320.0150.00516.76
7.4.300.0150.00416.70
7.4.290.0140.00516.67
7.4.280.0170.00516.69
7.4.270.0160.00516.62
7.4.260.0130.00516.47
7.4.250.0130.00616.12
7.4.240.0140.00416.15
7.4.230.0120.00516.16
7.4.220.0120.00516.16
7.4.210.0120.00416.16
7.4.200.0110.00516.16
7.4.190.0110.00516.17
7.4.180.0120.00516.18
7.4.160.0120.00416.20
7.4.150.0120.00416.12
7.4.140.0110.00416.10
7.4.130.0110.00516.05
7.4.120.0100.00516.06
7.4.110.0120.00416.04
7.4.100.0110.00516.13
7.4.90.0120.00416.02
7.4.80.0110.00516.01
7.4.70.0110.00616.03
7.4.60.0110.00516.03
7.4.50.0110.00416.01
7.4.40.0110.00515.98
7.4.30.0100.00516.04
7.4.20.0110.00416.03
7.4.10.0110.00416.02
7.4.00.0110.00416.04
7.3.330.0150.00516.45
7.3.320.0150.00415.88
7.3.310.0130.00415.97
7.3.300.0120.00416.02
7.3.290.0130.00515.98
7.3.280.0120.00515.99
7.3.270.0120.00416.01
7.3.260.0130.00515.98
7.3.250.0130.00415.98
7.3.240.0120.00415.99
7.3.230.0110.00616.01
7.3.220.0130.00415.96
7.3.210.0120.00515.95
7.3.200.0120.00515.94
7.3.190.0130.00415.98
7.3.180.0130.00415.94
7.3.170.0120.00515.99
7.3.160.0120.00515.94
7.3.150.0140.00415.95
7.3.140.0130.00515.96
7.3.130.0130.00515.95
7.3.120.0130.00415.95
7.3.110.0120.00515.94
7.3.100.0130.00415.92
7.3.90.0130.00416.18
7.3.80.0120.00515.97
7.3.70.0120.00516.03
7.3.60.0120.00516.05
7.3.50.0120.00416.04
7.3.40.0120.00416.04
7.3.30.0120.00516.03
7.3.20.0130.00517.06
7.3.10.0130.00417.01
7.3.00.0150.00317.05

preferences:
18.12 ms | 403 KiB | 5 Q