Re if() booleans

I tend to use the == true more often than not. The addtiaionl 7 characters make it a little easier to maintain over the long term. This is especially true for if(!$foo) where it's easy to miss then exclamation mark when going over someone else's code that hasn't been touched for a year.

Rob...

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
We don't take kindly to automated nonsensible adverts around here.