Function strip_php_comments
Deletes all PHP comments from a string. Useful when analyzing input from file_get_contents, etc.
If the code contains any strings in nowdoc or heredoc syntax, they will be converted to single- or double-quote strings.
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Admin.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Admin.php
string |
$code_str |
A string containing PHP code. |
string|null |
$line_ending = null |
One of "\r", "\n", or "\r\n". Leave unset for auto-detect. |
string
|
A string of PHP code with no comments in it. |