<?php
function aiomatic_filterwords($text)
{
    $filterWords = array(
        'shit',
        'fuck',
        'fucker',
        'fucking',
        'fucks',
        'fuckers',
        'nigger',
        'niggers',
        'motherfucker',
        'asshole',
        'Assface',
        'asswipe',
        'assholes',
        'pussy',
        'faggot',
        'faggots',
        'fags',
        'fag',
        'fuckin',
        'nigga',
        'cockhead',
        'cock-head',
        'CockSucker',
        'cock-sucker',
        'cunt',
        'cunts',
        'cock',
        'cocks',
        'shitty',
        'shittiest',
        'shits',
        'ass',
        'bitch',
        "bitch's",
        'bitches',
        'bitchs',
        'cock gobbler',
        'lesbionic',
        'dickhead',
        'dick head',
        'dickheads',
        'dick heads',
        'dickhole',
        'dick hole',
        'gurgle monster',
        'cum dumpster',
        'Carpet Muncher',
        'fatass',
        'fat-ass',
        'slut',
        'Blow Job',
        'Clit',
        'dildo',
        'jackoff',
        'jerk-off',
        'blow jobs',
        'anus',
        'bastard',
        'bastards',
        'butthole',
        'buttwipe',
        'crap',
        'God Damn',
        'God Damned',
        'God Damnit',
        'slut',
        'sluts',
        'Slutty',
        'jizz',
        'testicle',
        'butt-pirate',
        'nutsack',
        'nuttsack',
        'ahole',
        'ash0le',
        'ash0les',
        'asholes',
        'assh0le',
        'assh0lez',
        'assholz',
        'azzhole',
        'bassterds',
        'bastardz',
        'basterds',
        'basterdz',
        'Biatch',
        'c0ck',
        'c0cks',
        'c0k',
        'cawk',
        'cawks',
        'cuntz',
        'dild0',
        'dild0s',
        'dildos',
        'dilld0',
        'dilld0s',
        'f u c k',
        'f u c k e r',
        'f u c k i n g',
        'fag1t',
        'faget',
        'fagg1t',
        'faggit',
        'fagit',
        'fagz',
        'faig',
        'faigs',
        'Fudge Packer',
        'fuk',
        'Fukah',
        'Fuken',
        'fuker',
        'Fukin',
        'Fukk',
        'Fukker',
        'Fukkin',
        'jizm',
        'slutz',
        'assopedia'
    );
    $filterCount = sizeof($filterWords);
    for ($i = 0; $i < $filterCount; $i++) 
    {
        $text = preg_replace_callback('/\b' . $filterWords[$i] . '\b/i', function($matches){return str_repeat('*', strlen($matches[0]));}, $text);
    }
    return $text;
}
?>