diff --git a/src/Extractors/PhpCode.php b/src/Extractors/PhpCode.php index 1626c61e..ab9dfb37 100644 --- a/src/Extractors/PhpCode.php +++ b/src/Extractors/PhpCode.php @@ -44,7 +44,7 @@ public static function fromString($string, Translations $translations = null, $f public static function convertString($value) { if ($value[0] === "'") { - return substr(str_replace(['\\\\', '\\\''], ['\\', '\''], $value), 1, -1); + return strtr(substr($value, 1, -1), array('\\\\' => '\\', '\\\'' => '\'')); } $value = substr($value, 1, -1);