- var_dump: documentation ( source)
- token_get_all: documentation ( source)
<?php
$nowdoc = <<<'TEST'
class test {
public function myfunc() {
echo "hi mom";
}
}
TEST;
$tokens = token_get_all("<?php ". $nowdoc);
var_dump($tokens);