attributes[$attr])) { return $this->attributes[$attr]; } else { return null; } } public function setAttr($attr, $value) { $this->attributes[$attr] = $value; } } class WhiteWolf extends Person { public function __construct() { $this->setAttr(Attributes::$honesty, 10); //some arbitrary value } } $ww = new WhiteWolf; $ww->setAttr(Attributes::$honesty, $ww->getAttr(Attributes::$honesty) - 1);