note 27487 added to language.basic-syntax
| From: | carl at rack1 dot php dot net | Date: | Sat, 07 Dec 2002 19:13:56 +0000 |
| Subject: | note 27487 added to language.basic-syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40489@lists.php.net to get a copy of this message | ||
If you have code that uses the short open tags "<?" and "<?=", and
you want to be able to turn off short_open_tags, you will need to
change those tags to "<?php" and "<?php echo". For a small program
this is trivial to do manually, but if you have thousands of lines
of code, it makes sense to do this in a more automated way. A simple
search and replace will only work if you don't have the string <?
in any strings or comments. Quite likely you don't, but to solve this
not-quite-a-problem, I've written a program that does the job and does
it right. I challenge you all to come up with a PHP program that changes
its behavior after being passed through this tag expander. (Programs
that examine their own source don't count!)
The thing can be found in the CVS repository for BASE at sourceforge:
(you need to reassemble the URL - I had to cut it to be able to post it)
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basedb/
basedb/contrib/ConvertShortTags/
--
http://www.php.net/manual/en/language.basic-syntax.php
http://master.php.net/manage/user-notes.php?action=edit+27487
http://master.php.net/manage/user-notes.php?action=delete+27487
http://master.php.net/manage/user-notes.php?action=reject+27487