public function toString($base = 10) { if ($base == 10) { return $this->str; } else { if ($base == 16) { return BigInteger::bcdechex($this->str); } } }