WangYaofu created THRIFT-3745: --------------------------------- Summary: The precision should be 17 for double Key: THRIFT-3745 URL: https://issues.apache.org/jira/browse/THRIFT-3745 Project: Thrift Issue Type: Bug Components: PHP - Library Affects Versions: 0.9.3 Reporter: WangYaofu Assignee: WangYaofu Fix For: 0.10.0
The precision is lost when converting double to string. E.g: $num= 3.1415926535897931; $this->trans_->write(json_encode($num)); The value will be '3.1415926535898' and some precision lost after format operation. But expected value should be '3.1415926535897931'. Solution: ini_set("precision",17); $this->trans_->write(json_encode($num)); -- This message was sent by Atlassian JIRA (v6.3.4#6332)