Skip to content

Instantly share code, notes, and snippets.

@orlissenberg
Created April 16, 2015 10:30
Show Gist options
  • Save orlissenberg/cd92b94a71737224a283 to your computer and use it in GitHub Desktop.
Save orlissenberg/cd92b94a71737224a283 to your computer and use it in GitHub Desktop.
List of Parser Tokens Values on the CLI.
//
// http://php.net/manual/en/tokens.php
//
// WARNING: This means that the concrete value of a token may change between two PHP versions. For example the T_FILE constant is 365 in
// PHP 5.3, while the same value refers now to T_TRAIT in PHP 5.4 and the value of T_FILE is 369.
//
-> php -r 'for ($i=200; $i<500; $i++){ if (token_name($i) !== "UNKNOWN") { echo $i . " " . token_name($i) . "\n"; } };'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment