<?php
$client = new Yar_Client("http://api.example.com/operator.php");
/* The usual way: invoke the remote method as if it were local.
* This is translated into call("add", array(1, 2)) behind the scenes. */
var_dump($client->add(1, 2));
/* Equivalent: call the method explicitly by name */
var_dump($client->call("add", array(1, 2)));
/* Needed only when the remote service literally exposes a method
* named call (or __call), which the magic __call cannot reach */
var_dump($client->call("call", array($some_argument)));
?>
The above example will output
something similar to: