Wednesday, February 17, 2010

Indecipherable if conditional statement

I our line of work we have loads of opportunities to work with/on other developers code. Some style choices are amazing, here's one jewel of an if conditional.

if ( $qtn_ct > 3 
  and $qnr_floor
  or $qtn_ct > 3
  and $wkl->incl_cell_ph_tf == 't'
  or  $qtn_ct > 3
  and $wkl->incl_email_tf == 't'
  or $wkl->incl_notes_tf == 't' ) {
    // Some Code
}

It's a little hard to decipher with out some parenthesis to guide.

1 comments:

amac44 said...

Found your site by your diff_microtime() function, useful thanks. Gotta ask, You only have a blog post per month or so and *this* is what you have to say? ;)