<?php
$str = "oAAAoooo";
echo preg_replace_callback(
'/([\x00-\x1F\*\(\)\\\\])/',
function ($matches) {
return "\\".join("", unpack("H2", $matches[1]));
},
$str
); */
$str = "oAAAoooo";
function matches($matches) {
return "\\".join("", unpack("H2", $matches[1]));
}
echo mb_ereg_replace_callback(
'([\x00-\x1F\*\(\)\\\\])',
"matches",
$str
);
?>
- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
- Parse error: syntax error, unexpected '*' in /in/cAc1F on line 11
Process exited with code 255.
preferences:
180.63 ms | 1399 KiB | 62 Q