Menu

## ReverseEmulator extends TokenEmulator
in package

ReverseEmulator.php : 8

Reverses emulation direction of the inner emulator.

### Table of Contents

$emulator : TokenEmulator
__construct() : mixed
emulate() : array<string|int, mixed>
getPhpVersion() : string
isEmulationNeeded() : bool
preprocessCode() : string
reverseEmulate() : array<string|int, mixed>

### Properties

#### $emulator

ReverseEmulator.php : 11
`private TokenEmulator $emulator`

Inner emulator

### Methods

#### __construct()

ReverseEmulator.php : 13
`public __construct(TokenEmulator $emulator) : mixed`

##### Parameters

$emulator : TokenEmulator

##### Return values

mixed —

#### emulate()

ReverseEmulator.php : 25
`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> —

#### getPhpVersion()

ReverseEmulator.php : 17
`public getPhpVersion() : string`

##### Return values

string —

#### isEmulationNeeded()

ReverseEmulator.php : 21
`public isEmulationNeeded(string $code) : bool`

##### Parameters

$code : string

##### Return values

bool —

#### preprocessCode()

ReverseEmulator.php : 33
`public preprocessCode(string $code, array<string|int, mixed> &$patches) : string`

##### Parameters

$code : string
$patches : array<string|int, mixed>

##### Return values

string —

#### reverseEmulate()

ReverseEmulator.php : 29
`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