I dont know, I reused the pattern found here: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Templating/PhpEngine.php#L505