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.



![Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]](../sites/all/themes/drupal4hu/images/bg-center/bg-center_4.png)














