diff --git a/src/Converter/Converter.php b/src/Converter/Converter.php index 6e6a37147..fc861f4e5 100644 --- a/src/Converter/Converter.php +++ b/src/Converter/Converter.php @@ -64,7 +64,9 @@ public static function ascToHex32($string) */ public static function hex32ToAsc($string) { - $string = preg_replace('/\\\([0-9A-Fa-f]{2})/e', "''.chr(hexdec('\\1')).''", $string); + $string = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', function ($matches) { + return chr(hexdec($matches[1])); + }, $string); return $string; }