execute('getInt', []); echo "$v\r\n"; $s = $client->execute('getString', []); echo "$s\r\n"; $d = $client->execute('getData', []); $temp = data2string($d); echo "$temp\r\n"; $lstv = $client->execute('getListOfInts', []); $temp = '[' . implode(',',$lstv) . ']'; echo "$temp\r\n"; $lsts = $client->execute('getListOfStrings', []); $temp = '[' . implode(',',$lsts) . ']'; echo "$temp\r\n"; $lstd = $client->execute('getListOfData', []); $temp = '[' . implode(',',array_map(function($d) { return data2string($d); }, $lstd)) . ']'; echo "$temp\r\n"; $v1 = 123; $v2 = 456; $v3 = $client->execute('add', [$v1, $v2]); echo "$v3\r\n"; $s1 = 'ABC'; $s2 = 'DEF'; $s3 = $client->execute('concat', [$s1, $s2]); echo "$s3\r\n"; $d1 = [ 'ival' => 123, 'sval' => 'ABC' ]; $d2 = $client->execute('modify', [ $d1 ]); $temp = data2string($d2); echo "$temp\r\n"; } test('http://localhost:8001/test'); test('http://localhost:8002/test'); test('http://localhost:8003/test'); test('http://localhost:8004/test'); test('http://localhost:8005/test'); test('http://localhost:8006/server.php'); test('http://localhost:8007/server.php'); ?>