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');
require_once (SOAP_CLIENT_BASEDIR.'/SforceHeaderOptions.php');

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

  $sObject = new stdclass();
  $sObject->FirstName = 'Smith';
  $sObject->LastName = 'John';
  $sObject->Phone = '510-555-5555';
  $sObject->BirthDate = '1927-01-25';
  $sObject2->customfield__c = 'ABC Company';


  $sObject2 = new stdclass();
  $sObject2->FirstName = 'Mary';
  $sObject2->LastName = 'Smith';
  $sObject2->Phone = '510-486-9969';
  $sObject2->BirthDate = '1957-01-25';
  $sObject2->customfield__c = 'XYZ Company';

  echo "**** Creating the following:\r\n";
  $createResponse = $mySforceConnection->create(array($sObject, $sObject2), 'Contact');

  $ids = array();
  foreach ($createResponse as $createResult) {
    print_r($createResult);
    array_push($ids, $createResult->id);
  }
  echo "**** Now for Delete:\r\n";
  $deleteResult = $mySforceConnection->delete($ids);
  print_r($deleteResult);

  echo "**** Now for UnDelete:\r\n";
  $deleteResult = $mySforceConnection->undelete($ids);
  print_r($deleteResult);

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

Sample Output

**** Creating the following:
stdClass Object
(
    [id] => 0035000000UbfUmAAJ
    [success] => 1
)
stdClass Object
(
    [id] => 0035000000UbfUnAAJ
    [success] => 1
)
**** Now for Delete:
Array
(
    [0] => stdClass Object
        (
            [id] => 0035000000UbfUmAAJ
            [success] => 1
        )

    [1] => stdClass Object
        (
            [id] => 0035000000UbfUnAAJ
            [success] => 1
        )

)
**** Now for UnDelete:
Array
(
    [0] => stdClass Object
        (
            [id] => 0035000000UbfUmAAJ
            [success] => 1
        )

    [1] => stdClass Object
        (
            [id] => 0035000000UbfUnAAJ
            [success] => 1
        )

)