Re: Re: PHP in HTML code

From: Date: Tue, 16 Mar 2010 22:42:10 +0000
Subject: Re: Re: PHP in HTML code
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-302914@lists.php.net to get a copy of this message
maybe adding a <?php= as equivalent to <?= and <?php echo , then deprecating <?= would be useful. On Tue, Mar 16, 2010 at 7:18 PM, tedd <tedd.sperling@gmail.com> wrote: > At 5:54 PM +0000 3/15/10, Jochem Maas wrote: >> >> Op 3/13/10 3:49 PM, Jorge Gomes schreef: >>> >>>  First of all, i recommend the use of normal php tags (<?php ...  ?>) >>> because >>>  the short tags are atm marked as* **DEPRECATED*. >> >> that's a documentation error. >> >>> >>>  You should also echo your values to the page, instead using the shortcut >>> <?= >>>  (stop being a lazy ass! :P): >> >> it's not lazy, it's succinct and much easier to read (once you know what >> it means), > > Yes, but like all web languages, they don't live in a vacuum -- they must > play well with others to survive. Programming is dynamic not static. > > While using "<?=" identifies what follows "to you", it doesn't > "to others" > and therein lies the problem. If XML (and possibility others) don't accept > the short term tag, then why use it? > > Using "Standards" like this help promote better communication between all > languages -- what's wrong with that? Simply put, either communicate better > or don't -- that's your choice -- but your decision is also a demonstration > to your client/employer/peers as to your desire to produce the "best" > possible code. > > I look at code containing "<?=" the same way as I see html containing tables > and embedded styling for presentation -- "This must be old code OR the > programmer still doesn't get it". > > 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 > >

« previous php.general (#302914) next »