Parameter Hell
codeplanet.io
codeplanet.io
function something(array $options, $defaults=array('foo'=>1,'bar'=>2)){
...(array_intersect_key or something)...
}
Actual named parameters would work so much better.And Wordpress 'solves' this in the plugins API by suggesting using extract(), which converts an array into variables. Which is even worse.
I remember the horror of working with WINAPI. There are WINAPI functions with 10 or so arguments and I was using Delphi which as far as I remember had no support for dictionary literals, let alone named parameters.