Mar 22, 2011
Darius said...
I'm using this alternative syntax with Zend Framework. It's good to read and, what's more important, if I need to do some magic I can, because of using clear PHP.
Mar 22, 2011
WishCow said...
Did you leave out the alternate control structure syntax on purpose?
"Short open tags" is mentioned, but also not used in the picture.

Also, let's see an example where you have to call methods on the passed objects in the template, for example getters on a model.

Mar 23, 2011
ellisgl said...
I feel dirty using '%', since it reminds me of ASP>
Mar 24, 2011
Mitchell said...
I agree with Chris.. using <?php foreach ($x as $y): ?> <?php endforeach; ?> makes things far more readable... same with endif, endfor, etc.
Dec 28, 2011
Han Chung said...
If anyone is interested in testing out twig, I have created a simple webapp for it at demo.codefunc.com

Leave a Comment

  • Volker Dusch's Posterous

    Hi, i'm __edorian.
    I'm a magic method. Apart from that a php/mysql/web guy and a gamer... among other stuff