sebastianbergmann/php-token-stream — pull request #28 by christeredvartsen (2012-12-19 17:22:18+00:00)
Title: PHP_Token_FUNCTION::getName sometimes returns the wrong name

Given the following code:

```php
tokens() as $token) {
if ($token instanceof PHP_Token_FUNCTION) {
echo $token->getName() . PHP_EOL;
}
}
```

the output is:
```
foo
Exception
```
when it should be:
```
foo
anonymous function
```

This PR should fix this issue by changing the way the `getName()` method finds the function name.