fabpot/Twig — Issue #486: Typo in documentation: rot13 function example
Author: MidnightLightning
Created: 2011-10-27 21:55:48+00:00
State: open

In the "Extending Twig", [Filters section ](http://twig.sensiolabs.org/doc/advanced.html#filters), the example code:

```
$twig = new Twig_Environment($loader);
$twig->addFilter('rot13', new Twig_Filter_Function('rot13'));
```

should probably be:

```
$twig = new Twig_Environment($loader);
$twig->addFilter('rot13', new Twig_Filter_Function('str_rot13'));
```

since the name of the PHP function is `str_rot13()` not `rot13()`, but it's being referenced in Twig via `{{ "Twig"|rot13 }}`.