Re: short_open_tag
| From: | Stefan Walk | Date: | Sat, 22 Mar 2008 22:51:45 +0000 |
| Subject: | Re: short_open_tag | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36343@lists.php.net to get a copy of this message | ||
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> you can have short stuff without outputting stuff too. Regards, Stefan P.S. This patch will be the most useful addition to PHP that has been added for a long time, provided the purists and i-don't-know-how-to-write-testcases-the-right-way folks don't succeed in shooting it down.