Menu

## ParserFactory
in package

ParserFactory.php : 5

### Table of Contents

ONLY_PHP5 = 4
ONLY_PHP7 = 3
PREFER_PHP5 = 2
PREFER_PHP7 = 1
create() : Parser
  Creates a Parser instance, according to the provided kind.

### Constants

#### ONLY_PHP5

ParserFactory.php : 10
`public mixed ONLY_PHP5 = 4`

#### ONLY_PHP7

ParserFactory.php : 9
`public mixed ONLY_PHP7 = 3`

#### PREFER_PHP5

ParserFactory.php : 8
`public mixed PREFER_PHP5 = 2`

#### PREFER_PHP7

ParserFactory.php : 7
`public mixed PREFER_PHP7 = 1`

### Methods

#### create()

ParserFactory.php : 21

Creates a Parser instance, according to the provided kind.

`public create(int $kind[, Lexer|null $lexer = null ][, array<string|int, mixed> $parserOptions = [] ]) : Parser`

##### Parameters

$kind : int

  One of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5

$lexer : Lexer|null = null

  Lexer to use. Defaults to emulative lexer when not specified

$parserOptions : array<string|int, mixed> = []

  Parser options. See ParserAbstract::__construct() argument

##### Return values

Parser —

The parser instance

## Search results