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.'/SforcePartnerClient.php');
require_once ('../userAuth.php');
try {
  $mySforceConnection = new SforcePartnerClient();
  $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/partner.wsdl.xml');
  $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);

  $fields = array (
    'Type' => 'Electrical'
  );

  $sObject = new SObject();
  $sObject->fields = $fields;
  $sObject->type = 'Case';

  $response = $mySforceConnection->create(array ($sObject));
  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] => 50070000006oZIIAA2
    [success] => 1
)
Deleting Case:
stdClass Object
(
    [id] => 50070000006oZIIAA2
    [success] => 1
)
Emptying Recycle Bin:
stdClass Object
(
    [id] => 50070000006oZIIAA2
    [success] => 1
)