145

Found this today.

It's in production!

Comments
  • 9
    Funny guy wrote this :-D
  • 45
    is_true is seriously a masterpiece itself
  • 8
    Think this would do the same but more readable.

    Function kill_with_fire($doomed_object = this){
    $doomed_object = FALSE;
    $doomed_object = NULL;
    unset($doomed_object)
    return NULL;
    }
  • 5
    This poor soul was having a rough day with his code.
  • 13
    it's kind of like, when you use your calculator to calculate 2+2 in a test. Just in case.
  • 1
    @neonoxd 😂😂😂😂😂
  • 3
    @tmux It would be more readable but it wouldnt do the same. If you pass false as doomed_object, your code would not do the same as his.

    Aside from that... I would probably use this function on the person who wrote these functions... ugh...
  • 0
    @arekxv thank you for the feedback. I don't get the privilege of sharing code a lot so I really appreciate it.
  • 5
    @omgashnames I want to know how they made it almost 2000 lines without is_true()! What golden code lies above we won't know...
  • 4
    Kill with fire doesn't even do its job right. If you pass it false it will simply go into an Infinite loop. This is painful.
  • 4
    Find the developer who wrote this and kill them with fire
  • 2
    $this->kill_it_with_fire(null);

    Stack Overflow

    Same with false or an empty array.
  • 1
    Statement_inverted(statement_inverted(getSame));
  • 1
    Shouldn't the else statement be
    else{
    $doomed_object = true;
    $this->kill_with_fire($this);
    }
    Otherwise it'll just call a recursive infinite loop on itself
  • 1
    @nicnaknic $this is the class
  • 1
    @PlasmatikSteak so the function is passing in it's own class... I would really like to know what the rest of this class looks like.
  • 1
    I really want to look at the supposedly funny function in the middle but I'm to distracted by the beauty of the other two
Add Comment