> -----Original Message----- > From: Stefan Walk [mailto:[EMAIL PROTECTED] > Sent: 22 March 2008 22:52 > To: 'PHP Internals' > Subject: Re: [PHP-DEV] short_open_tag > > Johannes Schlüter schrieb: > > Now we have the big issue: Do we want to have short open > tags forever? > > Well, without tooo much thinking my idea would be to drop "<?" but > > keep "<?=", "<?=" shouldn't conflict with <?xml tags in the > same file, > > but make it simple to do templating using PHP, on the other > hand when > > not echo'ing stuff you already have to write more soo the four > > additional characters ("php ") don't matter that much - especially > > every decent editor/ide should be able to give you a > completion on that, if you want. > > <ul> > <? foreach ($items as $item): ?> > <li><?=$item?></li> > <? endforeach ?> > </ul>
The problem I have with <?= is it doesnt really help simplify templating. You end up still having to explicitly encode the output with htmlspecialchars() or whatever. <ul> <? foreach ($items as $item): ?> <li><?=htmlspecialchars($item)?></li> <? endforeach ?> </ul> So <?= ends up not really that much of an improvement over <?php echo htmlspecialchars($item); ?> imo. J -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php