3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface RequestInterface {} interface ResponseInterface {} class Request implements RequestInterface {} class Response implements ResponseInterface {} interface DelegateInterface { /** * Dispatch the next available middleware and return the response. * * @param RequestInterface $request * * @return ResponseInterface */ public function process(RequestInterface $request); } class Delegate implements DelegateInterface { public function process(RequestInterface $request): ResponseInterface { return new Response(); } } $delegate = new Delegate(); var_dump($delegate->process(new Request()));

preferences:
23.43 ms | 404 KiB | 5 Q