News Feed
Jobs Feed
Sections




News Archive
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

Justin Silverton\'s Blog: PHP Games

Guy Harpaz's Blog: PHP IDE Debug Protocol

DevShed: The Autoload Magic Function in PHP 5

Dave Dash's Blog: Firebug Lite and symfony

Stuart Herbert's Blog: Investigating A PDO Segfault


Community Events











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


community series phpunit functional code release development language tool introduction object zendframework2 opinion unittest testing podcast example application framework interview

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