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