preg_filter() is identical to preg_replace() except it only returns the (possibly transformed) subjects where there was a match. This is most useful with an array as the subject: previously you'd need to use preg_grep and preg_replace with the same regular expression to achieve this. It's obviously much faster to do a single command. Very handy!
Commenting on this Story is closed.