How I can change the following code preg_replace (deprecated in PHP 5.6):
$ Encoded = preg_replace ('/ ([\ 000- \ 011 \ 013 \ 014 \ 016- \ 037 \ 075 \ 077 \ 137 \ 177- \ 377]) / and',
"'='. Sprintf ('% 02X', ord ('\\ 1'))", $ encoded);
with preg_replace_callback?
$encoded = preg_replace_callback('/([\000-\011\013\014\016-\037\075\077\137\177-\377])\/and/', function($m) { return '='. sprintf('%02X', ord($m[1])); }, $encoded);- Wiktor Stribiżew