PHP 将下划线命名 转换为 驼峰式命名时间:2023-03-09 23:01:48 function convertUnderline($str , $ucfirst = true) { $str = ucwords(str_replace('_', ' ', $str)); $str = str_replace(' ','',lcfirst($str)); return $ucfirst ? ucfirst($str) : $str; }