The preg_filter() function is an inbuilt function in PHP which is used to perform a regular expression search and replace the text.
Syntax:
preg_filter( $pattern, $replacement, $subject, $limit, $count )
Parameters: This function accepts five parameters as mention above and describe below.