function test() { include_once "ff/Types.php"; $req = new ff\echo_thrift_in_t(); $ret = new ff\echo_thrift_out_t(); $req->data = 'OhNice!!!!'; $ffrpc = new ffrpc_t('127.0.0.1', 40241); if ($ffrpc->call('scene@0', $req, $ret)) { var_dump($ret); } else { echo "error_msg:" . $ffrpc->error_msg() . "\n"; } }