Re: [PHP] php and javascript error
- From: tedd@xxxxxxxxxxxx (tedd)
- Date: Sun, 11 Mar 2007 10:59:37 -0400
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 & Add theclosing </a> tag too.in such a cases I usually use <?= $var ?> instead <?php echo $var ?>. At
PPS: It's advisable not to use the short tags, use <?php instead of <?
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
.
- References:
- RE: [PHP] php and javascript error
- From: "Edward Kay"
- RE: [PHP] php and javascript error
- From: afan
- Re: [PHP] php and javascript error
- From: "Tijnema !"
- RE: [PHP] php and javascript error
- Prev by Date: Re: Long time to finish a program
- Next by Date: Re: [PHP] Array mysteries
- Previous by thread: Re: [PHP] php and javascript error
- Next by thread: help with script needed
- Index(es):
Relevant Pages
|