-
This PHP script wraps the Linux/UNIX grep command for performing file searches. It can be used to locate files on an *NIX filesystem.The code is very well commented and provides all the details needed to understand how the script works and how it needs to be used.
-
Class Grep Search can traverse a given directory recursively and search for a given text the contents of files with a given list of file name extensions.An array variable is used to store the path of the files that contain the specified text. The class returns the number of occurrences.Requirements: PHP 5.0 or higher
-
Grep Simulator can be used to search for text within files like the Unix grep utility.The class can traverse a directory recursively and read files with given file name extensions to find the text to be searched.Grep Simulator may also return the number of times that the search text string was found in a file.
-
pmatch is an alternative to grep. It has most of the same functionality, but coupled with the power of PCRE engine in PHP. By default, pmatch shows only the portion of the line that matched, unlike grep that always shows the entire line.


