Closed nyordanov closed 5 years ago
The following regex matches any function name which ends in print or echo:
print
echo
https://github.com/envato/envato-theme-check/blob/9b78fcf804c41ec3943d174c7c6afdab84800838/checks/themeforest.php#L55
Please consider changing it to /[^a-zA-Z0-9_\x7f-\xff](echo|print)\s*\(?\s*\$/
/[^a-zA-Z0-9_\x7f-\xff](echo|print)\s*\(?\s*\$/
The regex for matching valid PHP function names is taken from the "User-defined functions" page in the PHP documentation
The following regex matches any function name which ends in
print
orecho
:https://github.com/envato/envato-theme-check/blob/9b78fcf804c41ec3943d174c7c6afdab84800838/checks/themeforest.php#L55
Please consider changing it to
/[^a-zA-Z0-9_\x7f-\xff](echo|print)\s*\(?\s*\$/
The regex for matching valid PHP function names is taken from the "User-defined functions" page in the PHP documentation