time()-86400, 'path' => $str_cookie_path, 'domain' => '', 'secure' => false, 'httponly' => true, 'samesite' => 'Lax', ]); // destroy all session $_SESSION = null; session_destroy(); if ($bool_die === true) { // shutdown current script die($str_msg); } else { if ($str_msg) { echo $str_msg; } } } /** * Static method to clean all string character * from html element and attributes * * @param string $str_char * @return string */ public static function xssFree($str_char) { return str_replace(['\'', '"'], '', strip_tags($str_char)); } }