I'll never ever understand how my boss always ends up doing this kind of bullshit

This is production code, there won't ever be anything in there, NEVER

  • 3
    The dangling else.

    While I don't like the syntax (<?php }else {} ?> would have been preferred ) it can be pretty useful to show intent, and makes the code easier to read. Its good practice to stick a comment in the dangling else.

    For example:





    //model passed validation, continue.


    We actively practice this, I too was like "wtf" at first, but it's actually pretty useful.
  • 0
    @delegate212 Yeah, if it was in that sense, it would be great, but it's not
  • 5
    Mixing PHP and HTML what year is this?? Your boss should be ashamed to call himself a developer. Tell him I hate him just from looking at his disgusting code and please get him a calendar so he can see it’s not 1999 anymore.
    Its code like this that cements PHPs terrible reputation. Judging from that snippet you got bigger problems than just dangling else statements.
  • 0
  • 0
    @smtlk he's not a developer, he just learnt by himself playing around with wordpress and similar stuff

    BTW I also mix PHP & HTML and I kinda feel ashamed, too, but sometimes it's just so useful and easy...
  • 4
    Next level developers
  • 4
    @delegate212 too much line, how many it needs for a single file
  • 1
    @ZioCain find a good template g engine then and separate your concerns!
  • 1
    I smell brutal ctrl+v
Add Comment