class PhpStringTokenParser

Properties

static protected $replacements

Methods

static string
parse(string $str)

Parses a string token.

static string
parseEscapeSequences(string $str, string|null $quote)

Parses escape sequences in strings (all string types apart from single quoted).

static 
parseCallback($matches)

No description

static string
parseDocString(string $startToken, string $str)

Parses a constant doc string.

Details

at line 70
static string parse(string $str)

Parses a string token.

Parameters

string $str String token content

Return Value

string The parsed string

at line 96
static string parseEscapeSequences(string $str, string|null $quote)

Parses escape sequences in strings (all string types apart from single quoted).

Parameters

string $str String without quotes
string|null $quote Quote type

Return Value

string String with escape sequences parsed

at line 109
static parseCallback($matches)

Parameters

$matches

at line 130
static string parseDocString(string $startToken, string $str)

Parses a constant doc string.

Parameters

string $startToken Doc string start token content (<<<SMTHG)
string $str String token content

Return Value

string Parsed string