Advertisement
John-E

Buffer Sanitize PHP

Apr 11th, 2022
1,024
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.20 KB | None | 0 0
  1. <?php
  2.     function sanitize_all($buffer){
  3.         $search=array('/\t+/','/\n+/','/<!--(.|\s)*?-->/');
  4.         $replace=array(NULL,NULL,NULL);
  5.         $buffer=preg_replace($search,$replace,$buffer);
  6.         return $buffer;
  7.     };
  8. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement