Title: Parse error: syntax error, unexpected &#8216;function&#8217;
Last modified: April 27, 2018

---

# Parse error: syntax error, unexpected ‘function’

 *  Resolved [Brian_Tomasik](https://wordpress.org/support/users/brian_tomasik/)
 * (@brian_tomasik)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-function/)
 * On 24 Apr 2018, this plugin broke on my site with the error
 * `Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier(
   T_STRING) or \\ (T_NS_SEPARATOR) in [my_website_path]/wp-content/plugins/disabler/
   inc/logger/logger-init.php on line 3`
 * I removed the plugin for now. If I try to reactivate it, it says `Plugin could
   not be activated because it triggered a fatal error.`

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

 *  Plugin Author [saas](https://wordpress.org/support/users/saas/)
 * (@saas)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-function/#post-10225844)
 * Hi Brian,
 * It seems like you are using older version of PHP.
 * So please at least use PHP 5.6+, and you should not see this error.
 *  Thread Starter [Brian_Tomasik](https://wordpress.org/support/users/brian_tomasik/)
 * (@brian_tomasik)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-function/#post-10227700)
 * Ah, that fixed it. 🙂

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

The topic ‘Parse error: syntax error, unexpected ‘function’’ is closed to new replies.

 * ![](https://ps.w.org/disabler/assets/icon-256x256.jpg?rev=3101842)
 * [Disabler](https://wordpress.org/plugins/disabler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/disabler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/disabler/)
 * [Active Topics](https://wordpress.org/support/plugin/disabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/disabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/disabler/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Brian_Tomasik](https://wordpress.org/support/users/brian_tomasik/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-function/#post-10227700)
 * Status: resolved