The PHP (PEAR, Zend, etc) coding standard specifies that class names should be in upper CamelCase, while methods and variables (associative arrays keys probably as well) should be in lower camelCase format. The rationale for having classes in CamelCase and underscores is to emulates namespaces and create a parallel with file location, but somewhat I find that where it works well for classes it doesn't so much for variables.
Lets say you have to map some variables to your database columns or form elements. MySQL is not case sensitive (that I know of), neither is html, therefore $data['userId'] is pretty much the same as $data['userid'] to these. ORMs like Doctrine actually ignore camelCasing for columns and just fetch them in lowercase (or is it mysql just returning them as such). Nobody wants to deal with data that may or may not look like $data['productQuantity'] or $data['productquantity'] depending on where it's been. $data['product_quantity'] on the other hand leaves little ambiguity.
So what is the reasoning behind the current variable naming scheme of the coding standard? What prevents PHP to amend this standard to say that all variables should be in lowercase separated by an underscore (it works since we know that class names should start with an uppercase letter)?
Edit:
Please note that I'm not asking what is the purpose of a standard. I know what they are meant to resolve in general. I'm asking why the variable name standard in PHP is the way it is. i.e. I understand the reasoning behind the class naming scheme and the benefits in adopting it (makes your library compatible with many autoloader out there, etc). But I don't get why camelCasing variable names. Is there a special reason? Can I break away from this with no consequences?