Sample Call

<?php
// SOAP_CLIENT_BASEDIR - the 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.com password

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

/*--------------------------------------------------------\
| For checking the flow.
|  Create a Lead using the salseforce account 
|  Get the LEADID and modify it in following file
|  `SOAP_CLIENT_BASEDIR.'/userAuth.php'`
\--------------------------------------------------------*/

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

  $leadid = $LEADID;

  $query = "select id, title, firstname, lastname from lead where id = '$leadid'";

  $queryResponse = $mySforceConnection->query($query);
  $queryResult = new QueryResult($queryResponse);
  echo "***** Initial query response *****\n";
  print_r($queryResult);

  $sObject = new SObject();
  $sObject->fieldsToNull = array (
  "Title", "FirstName"
  );
  $sObject->type = 'Lead';
  $sObject->Id = $leadid;
  $updateResponse = $mySforceConnection->update(array ($sObject));

  echo "***** Updated object with fields to null *****\n";
  print_r($updateResponse);

  $queryResponse = $mySforceConnection->query($query);
  $queryResult = new QueryResult($queryResponse);
  echo "***** Final query response *****\n";
  print_r($queryResult);

} catch (Exception $e) {
  echo $mySforceConnection->getLastRequest();
  echo $e->faultstring;
}
?>

Sample Output

***** Initial query response *****
QueryResult Object
(
    [queryLocator] => 
    [done] => 1
    [records] => Array
        (
            [0] => SObject Object
                (
                    [type] => Lead
                    [fields] => stdClass Object
                        (
                            [Title] => CTO
                            [FirstName] => Francine
                            [LastName] => Feager
                        )

                    [Id] => 00Q7000000JchBwEAJ
                )

        )

    [size] => 1
)
***** Updated object with fields to null *****
stdClass Object
(
    [id] => 00Q7000000JchBwEAJ
    [success] => 1
)
***** Final query response *****
QueryResult Object
(
    [queryLocator] => 
    [done] => 1
    [records] => Array
        (
            [0] => SObject Object
                (
                    [type] => Lead
                    [fields] => stdClass Object
                        (
                            [Title] => 
                            [FirstName] => 
                            [LastName] => Feager
                        )

                    [Id] => 00Q7000000JchBwEAJ
                )

        )

    [size] => 1
)