Example #1
0
 public function httpclientAction()
 {
     $client = new HproseHttpClient('http://yaf.zhaoquan.com/hprose/httpserver');
     echo $client->hello('World');
     echo $client->test->edg();
     return false;
 }
Example #2
0
var_dump($test->invoke("hello", $args, 0, HproseResultMode::Raw, 0));
var_dump($test->invoke("hello", $args, 0, HproseResultMode::RawWithEndTag, 0));
try {
    $test->e();
} catch (Exception $e) {
    var_dump($e->getMessage());
}
try {
    $test->ee();
} catch (Exception $e) {
    var_dump($e->getMessage());
}
$test->hello('async world', function ($result, $args, $error) {
    echo "result: ";
    var_dump($result);
    echo "args: ";
    var_dump($args);
    echo "error: ";
    var_dump($error);
});
$test->hello("async world2", function ($result, $args, $error) {
    echo "result: ";
    var_dump($result);
    echo "args: ";
    var_dump($args);
    echo "error: ";
    var_dump($error);
});
$test->hello("async world3", function ($result, $args, $error) {
    echo "result: ";
    var_dump($result);
    echo "args: ";