Skip to content
Advertisement

Tag: legacy

How to pass the parameters properly for a callback function for preg_replace_callback using a preexisting function?

I am getting this error: Parse error: syntax error, unexpected ” (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)……… eval()’d code on line 2 Since removing e from the regex expression ~<IF (.?)(?<!-)>(.?)~se as shown in the line below because it became deprecated. I understood I need to use preg_replace_callback() and rewrite using an anonymous function however I

Advertisement