Try:
$text = preg_replace('/\[iframe=(.*?)x(.*?)\](.*?)\[iframe\]/ms',
'<iframe style="border: 1px solid rgb(204, 204, 204); width: \1px; height: \2px;" src="\3"></iframe>',
$text);
There were some unwanted slashes in \[\/iframe\] which needed to be changed to \[iframe\]
EDIT:
Actually your input string looks incorrect, as it does not have a closing iframe tag:
$text = '[iframe=200x200]http://stackoverflow.com[iframe] ';
should be
$text = '[iframe=200x200]http://stackoverflow.com[/iframe] ';
In cases where your string contains / you can make use of some other delimiter to make avoid escaping / found in the string. Something like:
$text = preg_replace('#\[iframe=(.*?)x(.*?)\](.*?)\[/iframe\]#ms',
'<iframe style="border: 1px solid rgb(204, 204, 204); width: \1px; height: \2px;" src="\3"></iframe>',
$text);