code: public static function toCamelCase($str, $catapitalise_first_char = false)
      {
          $str = strtolower($str);
          if ($catapitalise_first_char) {
              $str = ucfirst($str);
          }
  
          return preg_replace_callback('/_+([a-z])/', function ($c) {
              return strtoupper($c[1]);
          }, $str);
      }
docs: Translates a string with underscores into camel case (e.g. first_name -> firstName)
  
  @param      $str
  @param bool $catapitalise_first_char
  
  @return mixed