PHP 8.2.31
Preview: ReadonlyTokenEmulator.php Size: 905 B
//opt/cpanel/ea-wappspector/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php

<?php declare(strict_types=1);

namespace PhpParser\Lexer\TokenEmulator;

use PhpParser\PhpVersion;

final class ReadonlyTokenEmulator extends KeywordEmulator {
    public function getPhpVersion(): PhpVersion {
        return PhpVersion::fromComponents(8, 1);
    }

    public function getKeywordString(): string {
        return 'readonly';
    }

    public function getKeywordToken(): int {
        return \T_READONLY;
    }

    protected function isKeywordContext(array $tokens, int $pos): bool {
        if (!parent::isKeywordContext($tokens, $pos)) {
            return false;
        }
        // Support "function readonly("
        return !(isset($tokens[$pos + 1]) &&
                 ($tokens[$pos + 1]->text === '(' ||
                  ($tokens[$pos + 1]->id === \T_WHITESPACE &&
                   isset($tokens[$pos + 2]) &&
                   $tokens[$pos + 2]->text === '(')));
    }
}

Directory Contents

Dirs: 0 × Files: 14

Name Size Perms Modified Actions
3.27 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1.44 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
701 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1.53 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1.79 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
422 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
2.23 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1.41 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
437 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
976 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
905 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1013 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
819 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
3.04 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).