Sample Call

<?php
// SOAP_CLIENT_BASEDIR - folder that contains the PHP Toolkit and your WSDL
// $USERNAME - variable that contains your Salesforce.com username (must be in the form of an email)
// $PASSWORD - variable that contains your Salesforce.ocm password

define("SOAP_CLIENT_BASEDIR", "../../soapclient");
require_once (SOAP_CLIENT_BASEDIR.'/SforcePartnerClient.php');
require_once (SOAP_CLIENT_BASEDIR.'/SforceHeaderOptions.php');

try {
  $mySforceConnection = new SforcePartnerClient();
  $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/partner.wsdl.xml');
  $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);

  $processWorkItem1 = new ProcessWorkitemRequest();
  $processWorkItem1->action = "Approve";
  $processWorkItem1->workitemId = "04i500000004Rp6AAE";
  $processWorkItem1->comments = "Request approved";
  
  $processWorkItemRequestResponse = $mySforceConnection->processWorkitemRequest(array ($processWorkItem1));

  print_r($processWorkItemRequestResponse);
} catch (Exception $ex) {
  echo $mySforceConnection->getLastRequest();
  print_r($ex);
}
?>

Sample Output

stdClass Object
(
    [entityId] => 00Q5000000J4pQpEAJ
    [instanceId] => 04g500000004R4BAAU
    [instanceStatus] => Approved
    [newWorkitemIds] =>
    [success] => 1
)