3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Request {} interface Action { public function __invoke(Request $request); } class DummyAction implements Action { public function __invoke(Request $request, $id) { } }
Output for 7.0.0 - 7.2.0
Fatal error: Declaration of DummyAction::__invoke(Request $request, $id) must be compatible with Action::__invoke(Request $request) in /in/uhC5C on line 9
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Declaration of DummyAction::__invoke() must be compatible with Action::__invoke(Request $request) in /in/uhC5C on line 9
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Fatal error: Declaration of DummyAction::__invoke() must be compatible with that of Action::__invoke() in /in/uhC5C on line 9
Process exited with code 255.