function JsonParser::stringInterpolation
Parameters
string $match:
Return value
string
File
-
vendor/
seld/ jsonlint/ src/ Seld/ JsonLint/ JsonParser.php, line 560
Class
- JsonParser
- Parser class
Namespace
Seld\JsonLintCode
private function stringInterpolation($match) {
switch ($match[0]) {
case '\\\\':
return '\\';
case '\\"':
return '"';
case '\\b':
return \chr(8);
case '\\f':
return \chr(12);
case '\\n':
return "\n";
case '\\r':
return "\r";
case '\\t':
return "\t";
case '\\/':
return "/";
default:
return html_entity_decode('&#x' . ltrim(substr($match[0], 2), '0') . ';', ENT_QUOTES, 'UTF-8');
}
}