No Named Parameters in PHP6

By Deane Barker on March 10, 2006

Minutes PHP Developers Meeting: This really depresses me.

The functionality of named parameters was suggested. Named parameters allow you to “skip” certain parameters to functions.

[…] Discussion: We don’t see the real need for named parameters, as they seem to violate PHP’s KISS principle. It also makes for messier code.

[…] Conclusions: We do not want to add it.

I would love to have named parameters. They give you simpler way of doing things that you might do with simple objects — the kind where you have them just so you can set a bunch of properties then call a method.



  1. I’d like to have named parameters too. I often use a single array parameter to emulate just this. Of course, it’s more noisy to call it that way:

    func(array('a' => 'b'))

    rather than:

    func(a => 'b')

    but it does the job.

Comments are closed. If you have something you really want to say, email and we‘ll get it added for you.