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);

  $header = new EmailHeader(true, false, false);
  $mySforceConnection->setEmailHeader($header);

  $createFields = array (
  'FirstName' => 'Nick',
  'LastName' => 'Tran',
  'Email' => $EMAILIDFORHEADER,
  'Company' => 'DELETE_ME Company',
  'LeadSource' => 'PHPUnit',
  'City' => 'Tokyo',
  'Country' => 'Japan'
  );
  $sObject1 = new SObject();
  $sObject1->fields = $createFields;
  $sObject1->type = 'Lead';

  $createResponse = $mySforceConnection->create(array ($sObject1));

  print_r($createResponse);
} catch (SoapFault $fault) {
  print_r($mySforceConnection->getLastRequest());
  print_r($fault);
}
?>

Sample Output

stdClass Object
(
    [id] => 00Q7000000Nr9V7EAJ
    [success] => 1
)