Categories
Posts

Finding PHP Short Tags

There are a number of ways to escape between PHP and output (usually HTML) mode. Personally I recommend sticking with the traditional <?php style. One method that can cause problems is the so called ‘short tag’ style – <? and I recommend avoiding it.

So how do you know if there are PHP short tags being used some where in your code? I use grep to search for them: grep -rn "<?[^p]" *