protected function renderChildren() { $children = $this->children; foreach ($children as $key => $child) { if ($child instanceof Tag) { $children[$key] = $child->render(); } } return implode($children); }