xref: /php-src/ext/tokenizer/tokenizer.stub.php (revision 59d257d1)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @var int
7 * @cvalue TOKEN_PARSE
8 */
9const TOKEN_PARSE = UNKNOWN;
10
11function token_get_all(string $code, int $flags = 0): array {}
12
13function token_name(int $id): string {}
14
15class PhpToken implements Stringable
16{
17    public int $id;
18    public string $text;
19    public int $line;
20    public int $pos;
21
22    /** @return static[] */
23    public static function tokenize(string $code, int $flags = 0): array {}
24
25    final public function __construct(int $id, string $text, int $line = -1, int $pos = -1) {}
26
27    /** @param int|string|array $kind */
28    public function is($kind): bool {}
29
30    public function isIgnorable(): bool {}
31
32    public function getTokenName(): ?string {}
33
34    public function __toString(): string {}
35}
36