A tool to automatically change PHP short-tag <?/<?= notation into valid <?php and <?php echo syntax
Open Issues: 0
This package is auto-updated.
Last update: 2023-03-13 23:31:22 UTC
This tiny script is aimed at fixing the bad and ugly PHP short open tag syntax. It is based on PHP's tokenizer extension, so you'll have to install it first.
Please note, this is not a Regex replace implementation, this script will only match valid
<?php open tags in
valid PHP files.
Usage is pretty straightforward:
# bin/console should actually point to matching file from this repo bin/console fix ./ # where ./ is the path
Also you can only fix
-e options respectively.
Support nikic/php-parser when tokenizer is not available (is that possible?)
Fix issue that deletes whitespace after opening tags (e.g. newline after first opening tag in file)
Add pattern matching