Syntax Check: Check the syntax of PHP scripts

Recommend this page to a friend!
  Info   View files (2)   Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 449 All time: 6,083 This week: 295
Version License PHP version Categories
syntax-check 1.0MIT/X Consortium ...5PHP 5, Testing
Description Author

This class can check the syntax of PHP scripts.

It can traverse a given directory recursively to find files with the .php syntax.

The class can execute the PHP command line program version to check if the syntax of each of the PHP scripts that were found.

Innovation Award
PHP Programming Innovation award nominee
December 2012
Number 8


Prize: One downloadable e-book of choice by O'Reilly
Sometimes it is necessary to make changes in PHP applications, eventually to fix bugs and other issues.

Ideally the changed code should go through a series of tests to make sure the changes do not break any aspect of the applications functionality.

However, sometimes there is not much time to go through extensive tests. Often the changes are too small to expect major functionality breaking.

Still it is prudent to make sure that you are not breaking your code due to small syntax mistakes.

In that case the changed code should go at least through minimal testing that assures that the syntax of the code is not broken.

The PHP command line version program supports a lint mode that can do basic syntax checking without executing the code.

This class acts as a wrapper to perform such test using this feature of the PHP command line version command.

Manuel Lemos
Picture of Eper Kalman
Name: Eper Kalman <contact>
Classes: 10 packages by
Country: Serbia Serbia
Age: 44
All time rank: 7535 in Serbia Serbia
Week rank: 762 4 in Serbia Serbia
Innovation award
Innovation award
Nominee: 3x

  Files  
File Role Description
example.php Example example script
SyntaxCheck.class.php Class main class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:449
This week:0
All time:6,083
This week:295

For more information send a message to info at phpclasses dot org.