use Symfony\Component\HttpFoundation\Request; $request = Request::getInstance();
use Illuminate\Http\Request; $request = Request::getInstance();
use Zend\Diactoros\ServerRequestFactory; $request = ServerRequestFactory::fromGlobals();In this example, we are creating a new instance of the ServerRequestFactory class using the fromGlobals() method. We are using the Zend package library. In conclusion, the package library used with Request getInstance method can vary depending on the PHP framework or library used.