PHP Classes

Syntax Check: Check the syntax of PHP scripts

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2012-12-09 (7 years ago) RSS 2.0 feedNot enough user ratingsTotal: 449 All time: 6,067 This week: 295Up
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
Name: Eper Kalman <contact>
Classes: 10 packages by
Country: Serbia Serbia
Age: 44
All time rank: 7535 in Serbia Serbia
Week rank: 937 Down4 in Serbia Serbia Up
Innovation award
Innovation award
Nominee: 3x


  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example example script
Plain text file SyntaxCheck.class.php Class main class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,067
This week:295Up