We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20ec43d commit e354d26Copy full SHA for e354d26
examples/src/client/HttpClient.php
@@ -0,0 +1,8 @@
1
+<?php
2
+require_once "../../../vendor/autoload.php";
3
+
4
+use Hprose\Client;
5
6
+$client = Client::create('http://127.0.0.1:8080/', false);
7
+var_dump($client->hello("world"));
8
+var_dump($client->sum(1, 2, 3));
examples/src/server/HttpServer.php
@@ -7,6 +7,11 @@ function hello($name) {
return "Hello $name!";
}
9
10
+function sum($a, $b, $c) {
11
+ return $a + $b + $c;
12
+}
13
14
$server = new Server();
15
$server->addFunction('hello');
16
+$server->addFunction('sum');
17
$server->start();
0 commit comments