Title: [Theme: BigBlankTheme] Parse error: syntax error, unexpected T_FUNCTION
Last modified: August 30, 2016

---

# [Theme: BigBlankTheme] Parse error: syntax error, unexpected T_FUNCTION

 *  Resolved [paulogabriel](https://wordpress.org/support/users/paulogabriel/)
 * (@paulogabriel)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/theme-bigblanktheme-parse-error-syntax-error-unexpected-t_function/)
 * Hey, guys!
    I’m using BigBlankTheme and I’m getting this error:
 * Parse error: syntax error, unexpected T_FUNCTION in /home/content/23/9090823/
   html/extranet/hospedagem/DecoracaoBaile/wp-content/themes/BigBlankTheme/inc/filters.
   php on line 157
 * The context is this one:
 *     ```
       function bigblank_anchor_content_h2($content) {
   
           // Pattern that we want to match
           $pattern = '/<h2>(.*?)<\/h2>/';
   
           // now run the pattern and callback function on content
           $content = preg_replace_callback($pattern,
                   // function to replace the title with an id
                   function ($matches) {
               $title = $matches[1];
               $slug = sanitize_title_with_dashes($title);
               return '<h2 id="' . $slug . '"><a class="anchor" href="#' . $slug . '"><i class="fa fa-link"></i></a>' . $title . '</h2>';
           }
                   , $content);
           return $content;
       }
       ```
   
 * Line 157 has “**function ($matches) {**” written in it.
    Any thoughts?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 7 months ago](https://wordpress.org/support/topic/theme-bigblanktheme-parse-error-syntax-error-unexpected-t_function/#post-6675262)
 * Can you post lines 147 to 167 instead?
 *  [evansmattw](https://wordpress.org/support/users/evansmattw/)
 * (@evansmattw)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/theme-bigblanktheme-parse-error-syntax-error-unexpected-t_function/#post-6675535)
 * Just ran into this myself. Server was running PHP 5.2 which doesn’t support closures.
   Commented this function out and it worked fine. Then updated server to PHP 5.4,
   uncommented and reloaded; this resolved the issue. See more here: [http://stackoverflow.com/questions/4949573/parse-error-syntax-error-unexpected-t-function-line-10-help](http://stackoverflow.com/questions/4949573/parse-error-syntax-error-unexpected-t-function-line-10-help)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Theme: BigBlankTheme] Parse error: syntax error, unexpected T_FUNCTION’
is closed to new replies.

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)
 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [Setup](https://wordpress.org/support/topic-tag/setup/)

 * 2 replies
 * 3 participants
 * Last reply from: [evansmattw](https://wordpress.org/support/users/evansmattw/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/theme-bigblanktheme-parse-error-syntax-error-unexpected-t_function/#post-6675535)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
