@NogDogAug 15.2008 — #The long forms always work, the short forms only if your PHP configuration specifies that short_open_tag is ON. Thus I always use the long form to be on the safe side and make sure that at least that is never a portability issue.
@felgallAug 16.2008 — #The medium form and the long form both always work.
Medium Form:
<?php echo $var; ?>
Long Form:
<script language="php">echo $var;</script>
The two short forms can both be turned off so that you can use <? ?> and <% %> in your page without their being interpreted as the start end end of PHP.
Since you never know when you will need to have the script able to work when the short forms are off those versions are best avoided. The long form is so much longer than the others that it is seldom used since the medium form also always works and is a lot shorter.
@felgallAug 16.2008 — #I suppose if you had a situation where there are lots of <? ?> references within the content then some people might consider using the script tag around the actual PHP in order to make it clearer as to which are which. Even with short tags off if you have dozens of ?> in the actual content then telling where the PHP actually finishes could end up being difficult.
I can't think of any reason why anyone would have lots of such content though unless they were writing about PHP and even then a better alternative would be to use ?> for the content as that would be the smaller change.