- print_r: documentation ( source)
- preg_match_all: documentation ( source)
- array_diff: documentation ( source)
<?php
$input = 'Lorem Ipsum is simply dummy text of the printing industry.';
$except = array('and', 'the', 'text', 'simply');
preg_match_all('/(?<match>\w{3,}+)/', $input, $matches, PREG_PATTERN_ORDER);
print_r(array_diff($matches['match'], $except));