NOTE - you will notice that the sample output below is incorrectly formatted - a bug has been logged and will be fixed as soon as possible. In the meantime, you may want to use the Enterprise version of this call, if possible, as that returns correct results.

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

require_once ('../userAuth.php');

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

  $search = 'FIND {415*} IN PHONE FIELDS '.
        'RETURNING CONTACT(ID, PHONE, FIRSTNAME, LASTNAME), '.
        'LEAD(ID, PHONE, FIRSTNAME, LASTNAME), '.
        'ACCOUNT(ID, PHONE, NAME)';
  $searchResult = $mySforceConnection->search($search);

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

Sample Output

stdClass Object
(
    [searchRecords] => Array
        (
            [0] => stdClass Object
                (
                    [record] => stdClass Object
                        (
                            [type] => Contact
                            [Id] => Array
                                (
                                    [0] => 0035000000o1n2jAAA
                                    [1] => 0035000000o1n2jAAA
                                )

                            [any] => <sf:Phone>(415) 486-9969</sf:Phone><sf:FirstName>Mary</sf:FirstName><sf:LastName>Jones</sf:LastName>
                        )

                )

            [1] => stdClass Object
                (
                    [record] => stdClass Object
                        (
                            [type] => Contact
                            [Id] => Array
                                (
                                    [0] => 0035000000o1n2iAAA
                                    [1] => 0035000000o1n2iAAA
                                )

                            [any] => <sf:Phone>(415) 486-9969</sf:Phone><sf:FirstName>John</sf:FirstName><sf:LastName>Smith</sf:LastName>
                        )

                )

            [2] => stdClass Object
                (
                    [record] => stdClass Object
                        (
                            [type] => Account
                            [Id] => Array
                                (
                                    [0] => 0015000000VALE4AAP
                                    [1] => 0015000000VALE4AAP
                                )

                            [any] => <sf:Phone>(415) 901-7000</sf:Phone><sf:Name>sForce</sf:Name>
                        )

                )

        )

)