Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sad is definitely overkill here, especially for such a short snippet, but personally I prefer avoiding nested conditionals and else statements in general. Here's a fork that keeps conditional clauses to one line, and I personally find much more readable - https://gist.github.com/3029246

(disclaimer- not tested at all)



Thanks for forking and keep improving, I wish PHP guys do it at a native level too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: