On Fri, 14 Feb 2020 at 09:18, Philipp Tanlak <philipp.tan...@gmail.com> wrote:
> I would like to propose the new basic function: str_contains. > > The proposed signature for this function follows the conventions of other > signatures of string functions and should look like this: > > str_contains(string $haystack, string $needle): bool > > What are your opinions on this proposal? > In principle, yes. There are a couple of considerations first, like how you plan to handle case-insensitive matches; and previous discussions for this and the wider context of related string functions: https://externals.io/message/106162 https://externals.io/message/100142 https://externals.io/message/94787 https://wiki.php.net/rfc/add_str_begin_and_end_functions Peter