This is similar to WSDL mode, except we pass NULL as the WSDL file and make sure to set the location and uri options.
NULL
location
uri
$soap = new SoapClient(NULL, [ 'location' => 'https://example.com/soap/endpoint', 'uri' => 'namespace' ]);