'; return $output; } function execphp_apply($content) { // for debugging also group unimportant components with () // to check them with a print_r($matches) $pattern = '/'. '(<[\s]*\?php)'. // the opening of the )'. // the closing ? > tag '/is'; $content = preg_replace_callback($pattern, 'execphp_replace', $content); // to be compatible with older PHP4 installations // don't use fancy ob_XXX shortcut functions ob_start(); eval(" ?> $content