$s['res'] = preg_replace("/[in]?([cCswa]?)/","",$p['option']);
if(preg_match("/[in]?/",$p['option'])){$s['res']="l50";}
$s['uri'] = "/test/r.so/{$s['host']}/{$s['board']}/{$s['thread']}/{$s['res']}";

にしてみた。