31

Santa has come early this year...

Comments
  • 2
    To be fair that is clearer than isset() or !empty() for non PHP people. I'm assuming $program is some sort of event program not the actual app.
  • 1
    wtf? You get to use === 🥹
  • 1
    omfg.. All in a single branch? Please tell me someone commented-in a chapter of a book there.

    the fuck... Even whole Java files aren't that horrible!
  • 9
    Is that the else block 1120 lines long?
  • 4
    @hjk101 I think nobody complains about the conditional here. The problem is the huge "else" branch. Like, "return early" much?
  • 5
    @vintprox ah completely missed the line count there holy fuck
  • 1
    if($program){

    //true

    }else{

    //false, null, 99999, jeff, whatever

    }
  • 1
    I missed the line numbering too. Without reading the comments. Holy shit. I don't remember ever having one php file with more than 1000 lines. But that else { } alone has 1000 lines.
  • 1
    @ojt-rant

    No. if($program) would evaluate to true for 99999 or jeff.
  • 0
    @horus fair do's. Keep the === true bit
  • 2
    Imagine code review...

    - Wait, you can't have the whole program just like that in one single file. You need to structure it.
    - ok, hold my beer - [encloses whole prog in one if]
  • 0
  • 1
    Ohhh php
    Thought it was perl
Add Comment