7.php_strip_whitespace() 該函數可以返回已刪除PHP注釋以及空白字符的源代碼文件,這對實際代碼數量和注釋數量的對比很有用。 示例:復制代碼 代碼如下: php // PHP comment here /* * Another PHP comment */ echo php_strip_whitespace(__FILE__); // Newlines are considered whitespace, and are removed too: do_nothing();