mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

RFC: https://wiki.php.net/rfc/token_as_object Relative to the RFC, this also adds a __toString() method, as discussed on list. Closes GH-5176.
21 lines
562 B
PHP
21 lines
562 B
PHP
<?php
|
|
|
|
function token_get_all(string $source, int $flags = 0): array {}
|
|
|
|
function token_name(int $token): string {}
|
|
|
|
class PhpToken implements Stringable {
|
|
/** @return static[] */
|
|
public static function getAll(string $code, int $flags = 0): array;
|
|
|
|
public final function __construct(int $id, string $text, int $line = -1, int $pos = -1);
|
|
|
|
/** @param int|string|array $kind */
|
|
public function is($kind): bool;
|
|
|
|
public function isIgnorable(): bool;
|
|
|
|
public function getTokenName(): ?string;
|
|
|
|
public function __toString(): string;
|
|
}
|