_type = self::XMLRPC_TYPE_DOUBLE; $precision = (int)ini_get('precision'); $formatString = '%1.' . $precision . 'F'; $this->_value = rtrim(sprintf($formatString, (float)$value), '0'); } /** * Return the value of this object, convert the XML-RPC native double value into a PHP float * * @return float */ public function getValue() { return (float)$this->_value; } }