<?php
$text = "[b]devent4o ^^[/b] [img]http://www.google.bg/intl/en_com/images/logo_plain.png[/img] [u]drug devent4o ^^[/u]";
$parse = array(
"/\[img\](.*?)\[\/img\]/is" => "<img src=\"$1\" alt=\"\" />",
"/\[u\](.*?)\[\/u\]/is" => "<u>$1</u>",
"/\[b\](.*?)\[\/b\]/is" => "<strong>$1</strong>",
);
$text = preg_replace(array_keys($parse), array_values($parse), $text);
echo $text;
?>