How can I case insensitive test if a string contains another string as a single word? The needle is not allowed to have any other letters [a-z] around it.
Here are a few examples:
$needle = 'Test';
$haystack1 = 'This is a_test'; // true
$haystack2 = 'This is a test'; // true
$haystack3 = 'Test this is'; // true
$haystack4 = 'Another Test as example'; // true
$haystack5 = 'This is atest'; // false