Skip to content

Instantly share code, notes, and snippets.

@hubgit
Created January 7, 2015 22:04
Embed
What would you like to do?
SOAP vs REST
<?php
// SOAP (parameters as inputs to a function)
$client = new SoapClient('http://example.com/soap?wsdl', true);
$result = $client->call('getPeople', array('name' => 'Foo'));
// REST (parameters as filters on a collection)
$resource = new Resource('http://example.com/people/', array('name' => 'Foo'));
$result = $resource->get('json');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment