Login   Register  
PHP Classes
elePHPant
Icontem

Syntax Check: Check the syntax of PHP scripts

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 414 This week: 1All time: 5,746 This week: 1,478Up
Version License PHP version Categories  
syntax-check 1.0MIT/X Consortium License5PHP 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: 38
All time rank: 7825 in Serbia Serbia
Week rank: 105 Up2 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  
 0%Total:414All time:5,746
 This week:1This week:1,478Up