We name variables in Moodle by concatenating words together, e.g. $loggingquery, this is well documented. I have run a simple grep search on Moodle core code and found nearly 2k variable names that do not follow that convention and use underscore to separate words. Of course, we should not have core code not adhering to the standards we've set ourselves but maybe it's a good time to review that standard? Have a look at few examples of variable names we have now, and how will they look like if we rename them:
$used_for_db_sessions -> $usedfordbsessions
$fix_sql_params_i -> $fixsqlparamsi
$node_course_modules_quiz_question_instances -> $nodecoursemodulesquizquestioninstances
$node_course_question_categories_question_answer -> $nodecoursequestioncategoriesquestioncategory
It doesn't seem very readable but we have few "monsters" like this, e.g. $inorequaluniqueindex, $submissiongroupmemberswhoneedtosubmit, $origgradeincludescalesinaggregation .
I suggest that we either:
1. Change coding style.
2. Rename the variables to match existing coding style.
btw. here are the top 20 offenders with number of times they are used in the code: