Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

Debugging PHP: Did You Remember to "Dot All Your I's and Cross All Your T's"?

October 2, 2000

So you finally managed to install PHP and are now ready to conquer the web. You type: <? phpinfo(); ?> and get the pretty "Hello World from PHP". All anxious to put your new tool to use you find the print function in the manual, write your own hello world, load the page and then it hits you:
Parse error: parse error in /usr/local/apache/htdocs/test.php on line 2

You didn't think you were going to slip right into PHP without going through the compiler/parser initiation process, did you? Don't worry, we have the "Coles Notes" on common newbie problems and errors. We will start with general syntax errors, move on to runtime errors and conclude with tips on the infamous logical errors and some last resort links to visit when all else fails. The end of this article features a bulleted checklist to consult in case of errors. Print it and keep it by your side for those gloomy Sunday nights before the deadline. Many have spent hours banging their heads against their monitors so why should you (it's an expensive habit).

PHP automatically instantiates variables which means that you do not have to formerly declare them. A process called "autovivification". This is both a blessing and a curse. You don't have to worry about declaring every single variable at the top of your program (as you would in "C") but you do have to worry about misspelling your variable names and accidentally declaring new ones. Some languages, such as Perl, keep track of variables used only once and given the proper runtime options will warn you. Additionally Perl offers a very functional debugger. PHP development as of PHP 4.0.2 has not yet matured to this stage. A debugger was in development in previous PHP versions. It was last available in php3 CVS and is NOT available in PHP 4 - 4 CVS. The source has all references to the deugger_on function as php3 functions.

Do not let the debugger absence discourage you from PHP programming. PHP offers a wide range of functions you would expect from mature languages such as "C". Personally I find PHP one of the easiest and most "Web Functional" programming languages.

Contents:

Every sentence must end with a period
Spelling mistakes give you a few gray hairs
MySQL and PHP: They have some "TWERPS" of their own
Make your PHP programming life easier
Time to proofread your code - The Checklist

Every sentence must end with a period - Page 2


Up to => Home / Authoring / Languages / PHP




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers