RE: [PHP] Is echo tag reasonably portable?
| From: | Greg Donald | Date: | Tue, 15 Nov 2005 17:25:53 +0000 |
| Subject: | RE: [PHP] Is echo tag reasonably portable? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-225877@lists.php.net to get a copy of this message | ||
On Tue, 15 Nov 2005, Jim Moseby wrote:
Maybe at some point I too will be lucky enough to only work on code that I authored. for file in *.php; do cp $file $file.tmp php -r 'echo preg_replace("/<\?php=\s*/i","<?php echo ",preg_replace("/<\?(?!php)/i","<?php",file_get_contents($argv[1])));' $file.tmp >$file rm $file.tmp done -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/for file in *.php; do cp $file $file.tmp sed -e "s/<?$/<?php/g" $file.tmp >$file rm $file.tmp doneI maintain: "Better to save the grief and do it right to start with, no?"