PHP strpos: indexOf Alternative Guide
There is no built-in indexOf() function in PHP, but you can use the strpos() function to achieve a similar functionality. The strpos() function is used to search for a substring within a string and return the position of the first occurrence of the substring. It returns the position of the first occurrence of the specified substring in the string, or false if not found.