Re: php and javascript error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 3:25 PM +0100 3/11/07, Tijnema ! wrote:
On 3/11/07, tedd <<mailto:tedd@xxxxxxxxxxxx>tedd@xxxxxxxxxxxx> wrote:

At 5:28 PM +0100 3/7/07, <mailto:afan@xxxxxxxx>afan@xxxxxxxx wrote:
 > PS: If you want your code to validate, change the & to &amp;  Add the
 closing </a> tag too.
 PPS: It's advisable not to use the short tags, use <?php instead of <?
in such a cases I usually use <?= $var ?> instead <?php echo $var ?>. At
least it's shorter. :)

-afan

But, while it's shorter, it's still NOT advisable to use the shorter tags.

tedd


It does save space on your harddrive (Not much, but some :P)

and if it is for your own usage only, why not?

Tijnema

Tijnema:

Saves space? I would venture to say that if you took the inverse of the space that technique saves from a typical drive and turn it into dollars, we all (the entire world) could live the rest of our lives very comfortably. Another way to look at it, I would venture to say, if you took the total actual cost for the space everyone (all php programmers together) saved from a lifetime of work, you couldn't buy a cup of coffee with it. So, the old "let's save space" legacy concern doesn't mean squat anymore and it's meaning less squat each day.

<opinion>

It's a matter of style and consistency not to use short tags. Don't develop "bad-habits" when you can easily avoid them. Plus, while we develop code for ourselves, we seldom stay in that environment and when we do venture out, we often take those bad habits with us. Why do it wrong?

Also for me, adding "php" to a short tag is just a reminder of what language I'm currently using and that certainly doesn't inconvenience me a bit -. Besides, it provides me with some degree of comfort in that if I want to move my code publicly, or portions of it, I don't have to worry about past bad habits. After decades of programming, I have enough of those.

</opinion>

Additionally, while I have not dealt with xml yet, I have read that there is a problem in dealing with xml if you use the php short tag regardless of if you're coding for yourself or not.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux