public static function ucwords_callback($matches)
    {
        $leadingws = $matches[2];
        $ucfirst = AnHelperString::strtoupper($matches[3]);
        $ucword = AnHelperString::substr_replace(ltrim($matches[0]), $ucfirst, 0, 1);
        return $leadingws . $ucword;
    }
public static function ucwords_callback($matches)
    {
        $leadingws = $matches[2];
        $ucfirst = AnHelperString::strtoupper($matches[3]);
        $ucword = AnHelperString::substr_replace(ltrim($matches[0]), $ucfirst, 0, 1);
        return $leadingws . $ucword;
    }
public static function ucwords_callback ( $ matches ) { $ leadingws = $ matches [ 2 ] ; $ ucfirst = AnHelperString :: strtoupper ( $ matches [ 3 ] ) ; $ ucword = AnHelperString :: substr_replace ( ltrim ( $ matches [ 0 ] ) , $ ucfirst , 0 , 1 ) ; return $ leadingws . $ ucword ; }
Callback function for preg_replace_callback call in utf8_ucwords

You don't need to call this yourself

@param array of matches corresponding to a single word
@return string with first char of the word in uppercase
@see ucwords
@see strtoupper
Callback function for preg_replace_callback call in utf8_ucwords