note 27487 deleted from language.basic-syntax by sp
| From: | sp@php.net | Date: | Fri, 08 Aug 2003 20:57:33 +0000 |
| Subject: | note 27487 deleted from language.basic-syntax by sp | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53666@lists.php.net to get a copy of this message | ||
Note Submitter: carl (at) thep.lu.se
----
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/