/**
* Convert underscore_strings to camelCase (medial capitals).
*
* @param {string} $str
*
* @return {string}
*/
function snakeToCamel ($str) {
// Remove underscores, capitalize words, squash, lowercase first.
return lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $str))));
}