function camelcase($str) { return preg_replace_callback('/_(\\w)/', function ($match) { return strtoupper($match[1]); }, $str); }