ronan-gloo/jade-php — pull request #1 by sszigeti (2013-07-30 19:52:02+00:00)
Title: Bugfix. 'for' no longer shadows the 'foreach' keyword

This is a bugfix for enabling the PHP `foreach` keyword which was shadowed by `for` and was compiled to a PHP syntax error.

# Detailed explanation

Consider the following Jade template:

-$a = range(1, rand(1, 10))
ul
-foreach $a as $n:
li= $n

Previously this was compiled to the following PHP code which has a syntax error in line 3:

With simply putting the `foreach` keyword before `for` we get the correct PHP code: