Executes Twig and PHP activities in a safe manner