Registration a Twig_SimpleFunction after extensions initialized throw not LogicException, but Fatal Error

Registration a Twig_SimpleFunction after extensions initialized throw not LogicException, but Fatal Error:

$environment->addFunction(new Twig_SimpleFunction(...))
after 
$environment->render(...)
throws Fatal Error: 
object of Twig_SimpleFunction could not be converted to string