public static function fromCamelCase($name = '', $replace = '_', $lowerize_first_char = true)
    {
        if (empty($name)) {
            return '';
        }
        if ($lowerize_first_char) {
            $name[0] = strtolower($name[0]);
        }
        $func = create_function('$c', 'return "'.$replace.'" . strtolower($c[1]);');
        return trim(preg_replace_callback('/([A-Z])/', $func, $name), $replace);
    }