Difference between stripos and strpos in PHP?

In this blog, We are going to learn, what is the difference between stripes and strops in PHP?

PHP strpos() Function

The strpos() function finds the position of the first occurrence of a string inside another string.

<?php
echo strpos("I love India, I love php too!","India");
?>

Output:
7
  • The strpos() function is case-sensitive.
  • This function is binary-safe.

Syntax:

strpos(string,find,start)

PHP stripos() Function

The stripos() function finds the position of the first occurrence of a string inside another string.

Note: The stripos() function is case-insensitive.

Note: This function is binary-safe.

<?php
echo stripos("I love India, I love php too!","india");
?> 

Output: 7

Syntax

stripos(string,find,start)

I hope that you found this Blog helpful. If you’ve any queries, please leave comments in the comment section.

Thanks for following and reading this blog.