> Is there a utility out there that checks for typos, like a spell check but > for code? They are the most annoying things ever and probably the hardest of > errors to find in scrips. > Something simple, even command line would be handy.
It's good to program with error_reporting turned all the way up, E_ALL, which is configured with the error_reporting directive (see php.ini) or by the error_reporting function: error_reporting(E_ALL); Undefined variables, misspelled function names, and various typos will most likely turn up an error (unless you find a undocumented feature :). When an error says "undefined function" then it's either: a) Built-in PHP functions - A typo - PHP was not compiled with the given extension. For example, if mysql_connect is undefined, mysql wasn't compiled into PHP. b) User defined - A typo - Undefined, as in a function library wasn't includ()ed, etc. If a variable is undefined, it could be a typo because all good little programs make sure their variables are defined before use :) Anyway this rambling rant basically says turn up error_reporting and use Common Sense. And, to keep in mind that error reporting isn't perfect. If an error stumps someone, searching the archives (or google) for the error can be helpful. For example: http://marc.theaimsgroup.com/?l=php-general&s=headers+already+sent http://www.google.com/search?q=php+%22headers+already+sent%22 Anyway, what was the question again? :) Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]