Documentation

NumericLiteralSeparatorEmulator extends TokenEmulator
in package

Table of Contents

BIN  = '(?:0b[01]+(?:_[01]+)*)'
DEC  = '(?:[0-9]+(?:_[0-9]+)*)'
EXP  = '(?:e[+-]?' . self::DEC . ')'
FLOAT  = '(?:' . self::SIMPLE_FLOAT . self::EXP . '?|' . self::DEC . self::EXP . ')'
HEX  = '(?:0x[0-9a-f]+(?:_[0-9a-f]+)*)'
NUMBER  = '~' . self::FLOAT . '|' . self::BIN . '|' . self::HEX . '|' . self::DEC . '~iA'
SIMPLE_FLOAT  = '(?:' . self::DEC . '\.' . self::DEC . '?|\.' . self::DEC . ')'
emulate()  : array<string|int, mixed>
getPhpVersion()  : string
isEmulationNeeded()  : bool
reverseEmulate()  : array<string|int, mixed>
resolveIntegerOrFloatToken()  : int

Constants

Methods

emulate()

public emulate(string $code, array<string|int, mixed> $tokens) : array<string|int, mixed>
Parameters
$code : string
$tokens : array<string|int, mixed>
Return values
array<string|int, mixed>

reverseEmulate()

public reverseEmulate(string $code, array<string|int, mixed> $tokens) : array<string|int, mixed>
Parameters
$code : string
$tokens : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results