PHP Is Evil
By Adrian Sutton
Okay maybe not evil, just braindead in this particular area but I’ve got a theme going this afternoon.
If you have multiple form elements with the same name in a HTML form, PHP discards all but the last of them unless the element’s names end with []. How’s idea was that? Didn’t anyone consider the fact that you might not have control over the form element’s names? Or that dealing with form elements with special characters in their names might just be difficult (the PHP manual has a number of useful tips on how to handle it).
It seems to me that a dynamically typed language like PHP should be capable of working out for itself whether an array is needed for those elements or not. Sigh.