=== PHP Validator Lite === Contributors: manojtd Donate link: http://buy.thulasidas.com/php-validator Tags: developer tool, php, compile, debug, test plugin Requires at least: 2.5 Tested up to: 3.3 Stable tag: 1.01 PHP Validator Lite is a pseudo-compiler for PHP to help developers locate undefined functions and methods. == Description == *PHP Validator Lite* is a developer tool. It scans the file you specify and determines whether you have undefined functions or methods. Why not just run the PHP code, you say? Well, PHP is not a compiled language. It looks for functions during runtime. So if you have a segment of code not covered by your normal testing, and you have an undefined function in there, you will never know of the undefined function until it hits production when the particular conditions activating that particular code segment are met. In my case, in one of the projects I was working on (Easy PayPal, soon to become a WordPress plugin), I had a few include files defining functions in the global scope. I wanted to refactor them into three different classes and edit my ten or so source files the add `$class->` wherever necessary. Careful and systematic though I am, I kept missing a few function calls. Finally I got everything working. But I always had this fear that there were code paths that I may have missed, and there will be nasty surprises down the line, since the package is fairly complex and my test coverage is far from 100%. I thought it was silly to rely on tests to detect what in all other languages would be obvious compilation errors. So I started looking for compilers. I found some, but could never get any one of them work. So I decided to write a tool myself, which I named *PHP Validator*. I am happy to say that I managed to find a few undefined functions and methods (that I would have otherwise missed) using this tool. = Pro Version = *PHP Validator* is released as a Lite version here. It is fully functional and will locate all the undefineds as the [Pro version](http://buy.thulasidas.com/php-validator "Pseudo-compiler plugin for PHP to find undefined functions and methods, $0.99"). In the Pro version, it will also list the line numbers at which the undefined function occurs, which may make it a bit easier to locate. Also available is a [Stand-alone](http://buy.thulasidas.com/phpValidator "Pseudo-compiler package for PHP to find undefined functions and methods, $1.49") version that runs as an independent browser-based tool. == Upgrade Notice == = 1.01 = Minor code changes. == Screenshots == 1. PHP Validator in action == Installation == 1. Upload the PHP Validator plugin (the whole hitman) to the '/wp-content/plugins/' directory. 2. Activate the plugin through the 'Plugins' menu in WordPress. 3. Go to the Tools -> PHP Validator to load and validate your files. == Frequently Asked Questions == = What is the purpose of the "Include the files in autogenerated code" option? = This plugin works by scanning the PHP source file you specify for functions and methods and trying to locate them in the include files (in the source file as well as the ones you specify as "Extra include file(s)". In some (or most) cases, you have some functions/methods defined in the file you validating, in which case you have to include that one also, which is what this option specifies. == Change Log == * V1.01: Minor code changes. [April 20, 2012] * V1.00: Initial release. [April 3, 2012]