PhpStringTokenParser

class PhpStringTokenParser

Methods

static string parse(string $str)

Parses a string token.

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

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

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

Parses a constant doc string.

Details

static string parse(string $str)

Parses a string token.

Parameters

string $str String token content

Return Value

string The parsed string

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

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

Parameters

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

Return Value

string String with escape sequences parsed

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
doc_Symfony
2016-10-28 06:26:34
Comments
Leave a Comment

Please login to continue.