3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface FormBuilderInterface { public function getForm($form_arg /* , mixed ...$args */); } class FormBuilder implements FormBuilderInterface { public function getForm($form_arg, mixed ...$args) {} } class FormBuilderExtended extends FormBuilder { public function getForm($form_arg) {} }
Output for 8.5.0 - 8.5.6
Fatal error: Declaration of FormBuilderExtended::getForm($form_arg) must be compatible with FormBuilder::getForm($form_arg, mixed ...$args) in /in/nblth on line 12 Stack trace: #0 {main}
Process exited with code 255.
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18
Fatal error: Declaration of FormBuilderExtended::getForm($form_arg) must be compatible with FormBuilder::getForm($form_arg, mixed ...$args) in /in/nblth on line 12
Process exited with code 255.

preferences:
76.24 ms | 1130 KiB | 4 Q