Robert Lu
2017-10-08 17:16:00 UTC
Hi,
I write a echoF function:
namespace php tutorial
service Ping {
set<string> echoF(1: set< string > is_real),
}
And I implement it(in php):
class ExampleService implements PingIf
{
public function echoF(array $list_test)
{
return $list_test;
}
}
But, When I call echoF:
$arg = ["s1", "s3", "s5", "s7"];
$res = $client->echoF($arg);
var_dump($arg);
var_dump($res);
It outputs:
thrift_example/client.php:28:
array(4) {
[0] =>
string(2) "s1"
[1] =>
string(2) "s3"
[2] =>
string(2) "s5"
[3] =>
string(2) "s7"
}
thrift_example/client.php:29:
array(4) {
[0] =>
bool(true)
[1] =>
bool(true)
[2] =>
bool(true)
[3] =>
bool(true)
}
Is it caused by I use set<string> ? How Can I echo a set<string>? Or, it's a bug?
I write a echoF function:
namespace php tutorial
service Ping {
set<string> echoF(1: set< string > is_real),
}
And I implement it(in php):
class ExampleService implements PingIf
{
public function echoF(array $list_test)
{
return $list_test;
}
}
But, When I call echoF:
$arg = ["s1", "s3", "s5", "s7"];
$res = $client->echoF($arg);
var_dump($arg);
var_dump($res);
It outputs:
thrift_example/client.php:28:
array(4) {
[0] =>
string(2) "s1"
[1] =>
string(2) "s3"
[2] =>
string(2) "s5"
[3] =>
string(2) "s7"
}
thrift_example/client.php:29:
array(4) {
[0] =>
bool(true)
[1] =>
bool(true)
[2] =>
bool(true)
[3] =>
bool(true)
}
Is it caused by I use set<string> ? How Can I echo a set<string>? Or, it's a bug?