Timothy J Warren
9280b77d1e
Some checks failed
timw4mail/php-kilo/pipeline/head There was a failure building this commit
14 lines
277 B
PHP
14 lines
277 B
PHP
<?php declare(strict_types=1);
|
|
|
|
$file = file_get_contents('test.php');
|
|
$tokens = PhpToken::tokenize($file);
|
|
|
|
function addName (PhpToken $token): PhpToken
|
|
{
|
|
$token->type = $token->getTokenName();
|
|
return $token;
|
|
}
|
|
|
|
$tokens = array_map('addName', $tokens);
|
|
|
|
var_export($tokens); |