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.com password
 
define("SOAP_CLIENT_BASEDIR", "../../soapclient");
require_once (SOAP_CLIENT_BASEDIR.'/SforceEnterpriseClient.php');
require_once ('../userAuth.php');
try {
  $mySforceConnection = new SforceEnterpriseClient();
  $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/enterprise.wsdl.xml');
  $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);

  $fields = array (
    'Type' => 'Electrical',
    'Status' => 'New'
  );

  $sObject = new stdclass();
  $sObject->Type='Electrical';
  $sObject->Status='New';

  $response = $mySforceConnection->create(array ($sObject), 'Case');
  echo "***** Creating Case *****\n";
  print_r($response);
  $id = $response->id;
  echo "***** Deleting Case *****\n";
  print_r($mySforceConnection->delete(array($id)));
  echo "***** Emptying Recycle Bin *****\n";
  print_r($mySforceConnection->emptyRecycleBin(array($id)));
} catch (Exception $e) {
  echo $mySforceConnection->getLastRequest();
  echo $e->faultstring;
}
?>

Sample Output

***** Creating Case *****
stdClass Object
(
    [id] => 50070000006oZIDAA2
    [success] => 1
)
***** Deleting Case *****
stdClass Object
(
    [id] => 50070000006oZIDAA2
    [success] => 1
)
***** Emptying Recycle Bin *****
stdClass Object
(
    [id] => 50070000006oZIDAA2
    [success] => 1
)