Monday, August 4th, 2008

DoubleChecking your PHP

By Arc90

PHP allows you to define variables anywhere, at any time. They do not have to be defined prior to use. This can lead to silly bugs when you misspell a variable name. Anytime I found one of these errors in my code, I’d say to myself, “I wish I had a script that could show me alphabetized variable lists with a count” – so I built this script to save myself debugging time.

DoubleCheck (db.php) can be run against a PHP file and will output an alphabetized list of variables with their count. It will also print out methods with their count. Its still in version 0.1 and I hope to expand on it in the future.

Feel free to contact me with request or bug fixes.

Enjoy!

2 Responses

  1. Manolo said:

    what text editor you dont use? there is a lot of IDE’s that can help you with the variable list…

  2. Ben Sgro aka Mr-sk said:

    I use Komodo IDE.

Leave a Comment