Re:Calling PHP functions with named parameters
by maxpert on Sunday July 01, 2012 @02:46PM
(#4185721)
Sad in what sense?
[ Parent
| on HN ]
Re:Calling PHP functions with named parameters
by nodrama on Sunday July 01, 2012 @04:10PM
(#4185983)
I think he means sad in the sense that this should not be in application code. It should be in PHP interpreter. Fixing the interpreter in application code. Sad.
Re:Calling PHP functions with named parameters
by beezee on Sunday July 01, 2012 @03:00PM
(#4185756)
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)
Re:Calling PHP functions with named parameters
by maxpert on Sunday July 01, 2012 @03:06PM
(#4185769)
Thanks for forking and keep improving, I wish PHP guys do it at a native level too.
In the same sense as code that uses call_user_func_array is dirty looking. It's cruft that has nothing to do with application logic. It'd be nice to be able to do away with these things.