I have a large collection of php files written over the years and I need to properly replace all the short open tags into proper explicit open tags.
change \
This is a utility I wrote that converts PHP source that contains short open tags and replaces them with long tags.
i.e. it converts code like this:
= $var1 ?>
printf("%u changes\n",$changes) ?>
To this
The --skip-echo-tags option will cause it to skip = tags and only replace tags.
It’s written as a PHP-CLI script and needs the CLI php.ini file to be set to permit short short open tags. That’s the default setting for PHP 5.3.0 and earlier, but it might not always remain so. (The script simply won’t change anything if the setting isn’t enabled.)