public function parseInlineSimple($text) { foreach (['b', 'i', 'img', 'strike', 's', 'u', 'heading'] as $tag) { $text = preg_replace("#\\[{$tag}](.*?)\\[/{$tag}\\]#", "[{$tag}:{$this->uid}]\\1[/{$tag}:{$this->uid}]", $text); } return $text; }