Skip to content

Instantly share code, notes, and snippets.

@seinoxygen seinoxygen/comment.php
Last active Dec 27, 2015

Embed
What would you like to do?
Simple function to avoid junk content in comments.
<?php
/*
* Return how much compression was applied to the comment.
*/
function repetitive($comment){
if(strlen($comment) / strlen(gzcompress($comment)) > 10) {
return true;
}
return false;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.