Supported Versions: PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
Split given source into PHP tokens
<?php token_get_all(string $code, int $flags = 0): array
<?php         }



        $output = '';

        foreach (token_get_all($source) as $token) {

            if (is_string($token)) {

                $output .= $token;

            } elseif (in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) {