3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface FormStateInterface {} class FormState implements FormStateInterface {} class Config {} class ConfigFormBase { public function submitForm(array &$form, FormStateInterface $form_state) { var_dump(method_exists($this, 'mapFormValuesToConfig')); } } trait ValidatableConfigFormTrait { abstract protected static function mapFormValuesToConfig(FormStateInterface $form_state, Config $config): void; } class MyForm extends ConfigFormBase { use ValidatableConfigFormTrait; protected static function mapFormValuesToConfig(FormStateInterface $form_state, Config $config): void { // without this, PHP will complain! 👍 } } class SubMyForm extends MyForm {} $form = []; (new MyForm())->submitForm($form, new FormState()); (new SubMyForm())->submitForm($form, new FormState());

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.3.120.0100.01018.88
8.3.110.0100.00020.94
8.3.100.0040.01524.06
8.3.90.0120.00626.77
8.3.80.0000.01018.18
8.3.70.0130.00618.43
8.3.60.0170.00016.63
8.3.50.0110.00416.80
8.3.40.0110.00321.87
8.3.30.0130.00319.02
8.3.20.0070.00024.18
8.3.10.0000.00724.66
8.3.00.0040.00426.16
8.2.240.0070.00718.85
8.2.230.0030.00622.58
8.2.220.0130.00737.54
8.2.210.0060.00326.77
8.2.200.0000.00918.64
8.2.190.0090.00918.54
8.2.180.0190.00316.50
8.2.170.0090.00618.84
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00222.23
8.2.110.0040.00720.52
8.2.100.0060.00617.91
8.2.90.0240.00117.38
8.2.80.0190.00618.13
8.2.70.0190.00217.19
8.2.60.0220.00017.31
8.2.50.0200.00418.30
8.2.40.0200.00418.10
8.2.30.0230.00218.28
8.2.20.0090.00519.17
8.2.10.0250.00117.38
8.2.00.0180.00718.13
8.1.300.0060.01220.34
8.1.290.0090.00030.84
8.1.280.0110.01125.92
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0070.00319.14
8.1.230.0080.00420.98
8.1.220.0150.00617.24
8.1.210.0190.00517.25
8.1.200.0210.00917.94
8.1.190.0160.00616.87
8.1.180.0130.00817.00
8.1.170.0200.00318.14
8.1.160.0150.00617.13
8.1.150.0210.00317.12
8.1.140.0210.00117.97
8.1.130.0210.00217.18
8.1.120.0150.00717.19
8.1.110.0210.00218.19
8.1.100.0170.00417.25
8.1.90.0170.00318.19
8.1.80.0140.00817.19
8.1.70.0200.00417.24
8.1.60.0120.01017.42
8.1.50.0170.00617.99
8.1.40.0180.00417.35
8.1.30.0220.00017.36
8.1.20.0210.00218.29
8.1.10.0140.00817.42
8.1.00.0170.00517.23
8.0.300.0170.00616.56
8.0.290.0170.00617.49
8.0.280.0150.00816.63
8.0.270.0210.00616.61
8.0.260.0190.00616.66
8.0.250.0170.00618.34
8.0.240.0200.00716.61
8.0.230.0190.00517.49
8.0.220.0200.00516.69
8.0.210.0200.00416.61
8.0.200.0190.00516.81
8.0.190.0220.00416.73
8.0.180.0220.00416.50
8.0.170.0170.00917.62
8.0.160.0190.00516.56
8.0.150.0170.00716.44
8.0.140.0210.00417.49
8.0.130.0220.00416.63
8.0.120.0160.00617.62
8.0.110.0180.00616.38
8.0.100.0190.00517.55
8.0.90.0140.00916.49
8.0.80.0190.00417.42
8.0.70.0210.00316.69
8.0.60.0190.00417.50
8.0.50.0210.00316.63
8.0.30.0180.00517.55
8.0.20.0140.01016.62
8.0.10.0200.00517.55

preferences:
32.69 ms | 403 KiB | 5 Q