I've used to 'options as array' pattern in PHP plenty of times. While it's probably the closest thing to named parameters you can get in that language, it can get kind of ugly and clumsy when you have to validate it.<p><pre><code> function something(array $options, $defaults=array('foo'=>1,'bar'=>2)){
...(array_intersect_key or something)...
}
</code></pre>
Actual named parameters would work <i>so much better</i>.<p>And Wordpress 'solves' this in the plugins API by suggesting using extract(), which converts an array into variables. Which is even worse.