3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface MiddlewareInterface { public function process($req, $next); } interface HandlerInterface { public function process($req); } class MyHandler implements MiddlewareInterface, HandlerInterface { public function process($req) { } }
Output for 7.0.0 - 7.3.0rc3
Fatal error: Declaration of MyHandler::process($req) must be compatible with MiddlewareInterface::process($req, $next) in /in/H7YrN on line 13
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Declaration of MyHandler::process() must be compatible with that of MiddlewareInterface::process() in /in/H7YrN:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.15.4 - 3.21.3
Fatal error: Uncaught Error: Declaration of MyHandler::process() must be compatible with that of MiddlewareInterface::process() in /in/H7YrN:13 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.30
Fatal error: Declaration of MyHandler::process() must be compatible with MiddlewareInterface::process($req, $next) in /in/H7YrN on line 13
Process exited with code 255.