static public function toCamel($str, $capitalise_first_char = false) {
      if($capitalise_first_char) {
        $str[0] = strtoupper($str[0]);
      }
      return preg_replace_callback('/_([a-z])/',function($char) {return strtoupper($char[1]);}, $str);
  }
static public function toCamel($str, $capitalise_first_char = false) {
      if($capitalise_first_char) {
        $str[0] = strtoupper($str[0]);
      }
      return preg_replace_callback('/_([a-z])/',function($char) {return strtoupper($char[1]);}, $str);
  }
static public function toCamel ( $ str , $ capitalise_first_char = false ) { if ( $ capitalise_first_char ) { $ str [ 0 ] = strtoupper ( $ str [ 0 ] ) ; } return preg_replace_callback ( '/_([a-z])/' , function ( $ char ) { return strtoupper ( $ char [ 1 ] ) ; } , $ str ) ; }
Converts underscores to a corresponding camel-case string.

@param $str
@param $capitalise_first_char

@example this_is_a_test -> thisIsATest
@return string
Converts underscores to a corresponding camel - case string .