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.'/SforceEnterpriseClient.php');

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

  $processWorkItemRequest = new ProcessWorkitemRequest();
  $processWorkItemRequest->action = "Approve";
  $processWorkItemRequest->workitemId = "04i500000004TXEAA2";
  $processWorkItemRequest->comments = "Item has been approved.";

  $response = $mySforceConnection->processWorkitemRequest(array ($processWorkItemRequest));

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

Sample Output

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