- substr: documentation ( source)
- get_defined_constants: documentation ( source)
- asort: documentation ( source)
- array_filter: documentation ( source)
- printf: documentation ( source)
<?php
$tokenConstants = array_filter(
get_defined_constants(),
function ($value, $key) {
return substr($key, 0, 5) !== 'T_FMT' && substr($key, 0, 2) === 'T_';
},
ARRAY_FILTER_USE_BOTH
);
asort($tokenConstants);
echo 'Token | Value' . PHP_EOL;
echo '------------------------------ | -----' . PHP_EOL;
foreach ($tokenConstants as $tokenConstant => $value) {
printf("%-30s | %s\n", $tokenConstant, $value);
}
This script was stopped while abusing our resources