public function TrimCents() { $val = $this->value; if (floor($val) == $val) { return floor($val); } return $val; }