PHP when running a “foreach”, find out which item on the list was a match [duplicate]

When this code is run, how can I echo matched variable from $spam_keywords?

Once a variable is matched/found I would like echo it or save it to another veriable.

$uri = $_SERVER['REQUEST_URI'];

$spam_keywords = [
    'spamword1',
    'spamword2',
    'spamword3'
// WILL BE A LOT MORE HERE
];

function checkKeywords($uri, $keywords) {
    foreach ($keywords as $keyword) {
        if (strpos($uri, $keyword) !== false) {
            return true;
        }
    }
    return false;
}

if (checkKeywords($uri, $spam_keywords)) {
    // HERE I NEED TO ECHO WHICH KEYWORD WAS MATCHED
    echo "<p>HOW TO ECHO WHICH KEYWORD WAS MATCHED?</p>";
} else {
    echo "keywords not found";
}