I was looking at the answer to this question, and it was strange to me that the str_contains
function for PHP 8 always returns true if the $needle parameter is an empty string. If the string being searched has any characters in it, it isn't an empty string, so I'm curious as to why would str_contains
work this way?
Was there a technical reason behind this choice? Do other programming languages have "contains" functions that operate this way?