On May 10, 2011, at 11:11 AM, Andre Polykanine wrote:

> Hi everyone,
> Many  times  I heard that the following two peaces of code are written
> in a bad manner:
> 1.
> <?
> echo "Hello, world!";
> ?>
> 
> 2.
> <form action="script.php" method="post">
> <p>Your   e-mail:   <input   type="text"   id="uemail"   name="uemail"
> value="<?=$f['Email']?>"></p>
> ...
> </form>
> 
> As for now, I use both quite often. Why is this considered not kosher,
> I mean, good coding practice?
> Thanks!
> 
> -- 
> With best regards from Ukraine,
> Andre
> Skype: Francophile
> Twitter: http://twitter.com/m_elensule
> Facebook: http://facebook.com/menelion


Because short tags aren't always enabled and can cause things to break when 
deploying code to different environments. Best practice dictates that your code 
should be as environmentally independent as possible.

It's another few characters, why neglect it?

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to