function first_child() { if (count($this->children) > 0) { return $this->children[0]; } return null; }