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(in_array(ValidatableConfigFormTrait::class, class_uses($this))); } } 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.4.20.0160.00322.37
8.4.10.0090.00023.70
8.3.150.0060.01320.80
8.3.140.0120.00616.62
8.3.130.0040.00418.19
8.3.120.0110.00018.91
8.3.110.0120.00316.50
8.3.100.0030.00616.41
8.3.90.0040.01126.77
8.3.80.0060.00317.97
8.3.70.0040.01118.43
8.3.60.0040.01416.72
8.3.50.0130.00618.16
8.3.40.0160.00021.90
8.3.30.0060.00918.95
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0080.00026.16
8.2.260.0040.00418.59
8.2.250.0120.00318.61
8.2.240.0040.00417.11
8.2.230.0000.01220.94
8.2.220.0060.00316.52
8.2.210.0070.01126.77
8.2.200.0030.00616.38
8.2.190.0070.01118.16
8.2.180.0040.01116.50
8.2.170.0090.00618.96
8.2.160.0100.00722.96
8.2.150.0030.00525.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00422.13
8.2.110.0060.00321.02
8.2.100.0110.00017.66
8.2.90.0280.00817.38
8.2.80.0200.01017.13
8.2.70.0270.00517.13
8.2.60.0250.00717.25
8.2.50.0240.00317.25
8.2.40.0260.00417.13
8.2.30.0250.00417.38
8.2.20.0210.00617.25
8.2.10.0180.00917.50
8.2.00.0210.00817.38
8.1.310.0000.01016.50
8.1.300.0090.00615.98
8.1.290.0000.00930.84
8.1.280.0040.01125.92
8.1.270.0090.00020.41
8.1.260.0080.00026.35
8.1.250.0020.00528.09
8.1.240.0050.00523.97
8.1.230.0080.00421.03
8.1.220.0270.00416.98
8.1.210.0270.00317.13
8.1.200.0260.00317.13
8.1.190.0230.00317.00
8.1.180.0150.01117.22
8.1.170.0260.00017.13
8.1.160.0170.00917.25
8.1.150.0270.00017.22
8.1.140.0250.00416.98
8.1.130.0110.01717.23
8.1.120.0220.00617.23
8.1.110.0230.00717.38
8.1.100.0240.00417.46
8.1.90.0220.00517.13
8.1.80.0110.01717.34
8.1.70.0250.00217.25
8.1.60.0200.01016.97
8.1.50.0220.00417.38
8.1.40.0200.00817.50
8.1.30.0230.00617.13
8.1.20.0210.00717.13
8.1.10.0220.00817.13
8.1.00.0170.01017.25
8.0.300.0150.01316.47
8.0.290.0220.00616.72
8.0.280.0250.00516.38
8.0.270.0260.00316.50
8.0.260.0240.00316.61
8.0.250.0220.00716.75
8.0.240.0250.00316.25
8.0.230.0250.00516.50
8.0.220.0270.00316.38
8.0.210.0230.00716.63
8.0.200.0230.00616.63
8.0.190.0160.01216.75
8.0.180.0260.00316.49
8.0.170.0190.00816.88
8.0.160.0270.00316.75
8.0.150.0250.00416.60
8.0.140.0230.00316.63
8.0.130.0280.00016.62
8.0.120.0200.01116.62
8.0.110.0290.00016.63
8.0.100.0280.00016.50
8.0.90.0180.00916.50
8.0.80.0260.00616.63
8.0.70.0210.00616.46
8.0.60.0260.00316.61
8.0.50.0260.00316.48
8.0.30.0240.00516.38
8.0.20.0280.00016.87
8.0.10.0280.00016.63

preferences:
42.37 ms | 403 KiB | 5 Q