News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Jani Hartikainen's Blog:
Three PHP mistakes that will cause you debugging nightmares
January 22, 2009 @ 12:51:50

Jani Hartikainen has posted about three simple, but hard to find, mistakes that can cause you endless frustration if you're not looking in the right places.

Here's his list:

  • Semicolon after a while - a small problem with big (infinitely looping) consequences)
  • empty() and magic __get method - __get will hit first, then empty
  • Missing semicolon after break or continue - a classic that can make switches and evaluations difficult to debug

Comments on the post include a few others: working with variables by reference, comparisons with == versus === and strpos finding the first character in a string.

0 comments voice your opinion now!
mistake semicolon empty magic break continue debug nightmare


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Creating Code Coverage Statistics with xdebug

Davey Shafik's Blog: AJAX and PHP End-to-End Debugging

International PHP Magazine: IPM Poll Question: Which Is the Best Way to Do PHP Web Testing?

Kevin Schroeder's Blog: Remote Debugging with the Zend Debugger and PHPUnit

Chris Cassell's Blog: Creating Magic Methods in PHP


Community Events





Don't see your event here?
Let us know!


list language introduction series podcast composer framework release security artisanfiles symfony laravel version tool conference community opinion library interview voicesoftheelephpant

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework