// {|FUN} 单独使用函数 $rule = preg_replace_callback('/{|(\w+)}/', function($match){return $match[1]();},$rule);