Javatpoint Logo
Javatpoint Logo

PHP strpbrk() Function

The strpbrk() function is predefine string function of PHP. It is used to search a string for any of the specified characters or search a string for any of a set of character.

Note: This function strpbrk() is case-sensitive.


Parameter Description Required/Optional
string Specify the string to search Required
charlist Specify the character to find Required

It returns the rest of the string from where it found the first occurrence of any of the specified character.

Example 1


Your string:Hello javatpoint
	By using 'strpbrk()' function:ello javatpoint

Example 2


Your string:This is a Simple text.
	By using 'strpbrk()' function:Simple text.

Example 3


Your string:This is a Simple text.
	By using 'strpbrk()' function: is is a Simple text.

See Also :

  • strcasecmp() : It is used to compare two strings.
  • strchr() : It is used to find the first occurrence of a string inside another string.
  • stscroll() : It is locale based string comparison.
  • strcmp() : It is binary safe string comparison.


Next TopicPHP String

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA