I don't deal with preg_replace that often but after spending a couple of minutes looking at preg_replace_callbak I am thinking that something like this will work:
$value = preg_replace_callback('/<%(.*)%>/sU', function(){ return @constant("\\1"); }, $value);
Worst that can happen is it won't ;p
edited in: also remove the e modifier I think. I forgot to do that originally.
.
__________________
All cookies cleared!
|