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) { print "original"; } } trait ValidatableConfigFormTrait { abstract protected static function mapFormValuesToConfig(FormStateInterface $form_state, Config $config): void; public function submitForm(array &$form, FormStateInterface $form_state) { print "trait"; } } class MyForm extends ConfigFormBase { use ValidatableConfigFormTrait; protected static function mapFormValuesToConfig(FormStateInterface $form_state, Config $config): void { // without this, PHP will complain! 👍 } } $form = []; (new MyForm())->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.0060.01022.27
8.4.10.0030.00623.63
8.3.150.0080.00020.60
8.3.140.0090.00020.55
8.3.130.0080.00018.41
8.3.120.0030.00618.84
8.3.110.0090.00020.94
8.3.100.0090.00016.54
8.3.90.0070.00016.52
8.3.80.0030.00917.97
8.3.70.0100.01018.55
8.3.60.0100.01018.31
8.3.50.0070.00716.47
8.3.40.0140.00021.61
8.3.30.0070.00720.34
8.3.20.0070.00024.18
8.3.10.0050.00324.66
8.3.00.0060.00326.16
8.2.260.0110.00418.94
8.2.250.0050.00516.66
8.2.240.0060.00318.89
8.2.230.0000.01022.58
8.2.220.0040.00424.06
8.2.210.0160.00326.77
8.2.200.0090.00018.16
8.2.190.0100.01016.78
8.2.180.0100.01016.63
8.2.170.0110.00719.12
8.2.160.0090.00922.96
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.08
8.2.110.0060.00319.14
8.2.100.0090.00317.72
8.2.90.0200.00318.77
8.2.80.0140.00518.77
8.2.70.0110.00818.77
8.2.60.0090.01118.77
8.2.50.0170.00318.77
8.2.40.0130.00718.77
8.2.30.0100.01018.77
8.2.20.0070.01418.77
8.2.10.0070.01118.77
8.2.00.0140.00718.77
8.1.310.0000.00816.76
8.1.300.0130.00620.30
8.1.290.0030.00619.64
8.1.280.0130.00325.92
8.1.270.0060.00324.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00420.21
8.1.230.0070.00420.95
8.1.220.0100.00718.77
8.1.210.0140.00318.77
8.1.200.0130.00618.77
8.1.190.0150.00318.77
8.1.180.0080.01118.77
8.1.170.0130.00518.77
8.1.160.0150.00418.77
8.1.150.0040.01318.77
8.1.140.0090.00918.77
8.1.130.0130.00818.77
8.1.120.0140.00618.77
8.1.110.0150.00618.77
8.1.100.0130.00618.77
8.1.90.0140.00618.77
8.1.80.0150.00418.77
8.1.70.0060.01418.77
8.1.60.0170.00318.77
8.1.50.0110.00818.77
8.1.40.0140.00718.77
8.1.30.0200.00018.77
8.1.20.0040.01718.77
8.1.10.0110.01118.77
8.1.00.0140.00718.77
8.0.300.0150.00019.83
8.0.290.0190.00018.77
8.0.280.0130.00518.77
8.0.270.0160.00318.77
8.0.260.0150.00318.77
8.0.250.0180.00018.77
8.0.240.0180.00018.77
8.0.230.0190.00018.77
8.0.220.0090.00918.77
8.0.210.0120.00518.77
8.0.200.0170.00318.77
8.0.190.0120.00818.77
8.0.180.0170.00418.77
8.0.170.0090.00918.77
8.0.160.0180.00018.77
8.0.150.0060.01318.77
8.0.140.0090.00918.77
8.0.130.0030.01418.77
8.0.120.0140.00318.77
8.0.110.0180.00018.77
8.0.100.0170.00018.77
8.0.90.0110.00718.77
8.0.80.0150.00518.77
8.0.70.0140.00518.77
8.0.60.0170.00018.77
8.0.50.0190.00018.77
8.0.30.0170.00318.77
8.0.20.0140.00318.77
8.0.10.0120.00818.77

preferences:
33.07 ms | 403 KiB | 5 Q