Looking at the dovars() funtion in vB 2.3.0 I can't see why this wouldn't work.
IMO, if you not using the vB template system then you should be, remember this will use the default replacement set:
PHP Code:
$replacementsetid = X; // the replacement set to use
$var = dovars($var); // $var contains the HTML for the replacements to be issued on
echo $var; // outputs the HTML to the browser