The code to use RPC or Document style SOAP is practically the same! WSDL handles the details for you.

RPC/Encoded SOAP Call

<?php
require_once('SOAP/Client.php');

$WSDL = new SOAP_WSDL(
    
'http://mssoapinterop.org/stkV3/Interop.wsdl');
$client $WSDL->getProxy();
$response $client->echoString('this is a test');

print 
$client->xml;
?>
Document/Literal SOAP Request

<?php
require_once('SOAP/Client.php');

$WSDL = new SOAP_WSDL('
    http://mssoapinterop.org/stkv3/wsdl/interopTestDocLit.wsdl'
);
$client $WSDL->getProxy();
$response $client->echoString('this is a test');

print 
$client->xml;
?>