Tokenizer extension:
magic.php:
<?php
function apply_magic(&$a) {
$a = $a + rand(0,3);
}
?>
tokenize.php:
<?php
foreach (token_get_all($script) as $token) {
if (count($token) == 2) {
printf ("%-25s [%s]\n", token_name($token[0]), $token[1]);
} else {
printf ("%-25s [%s]\n", "", $token[0]);
}
}
?>