Define token callback

- « Parle\RLexer::build

- Parle\RLexer::consume »

- PHP Manual
- Parle\RLexer
- Define token callback

# Parle\RLexer::callout

(PECL parle >= 0.7.2)

Parle\RLexer::callout — Define token callback

### Description

public Parle\RLexer::callout(int `$id`, callable `$callback`): void

Define a callback to be invoked once lexer encounters a particular token.

### Parameters

`id`

  Token id.

`callback`

  Callable to be invoked. The callable doesn't receive any arguments and its return value is ignored.

### Return Values

No value is returned.