From 4e6449bd0bb89d65bbdf1cf6cd1df5082e8b38f5 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Fri, 19 Feb 2016 08:10:55 +0100 Subject: [PATCH] Support PHP 5.3 --- src/Extractors/PhpCode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);