Title: PHP Parse error: syntax error, unexpected &#8216;const&#8217; (T_CONST)
Last modified: December 11, 2019

---

# PHP Parse error: syntax error, unexpected ‘const’ (T_CONST)

 *  Resolved [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-const-t_const/)
 * With the latest update I get an HTTP 500 because php^7.0 fails to interpret the
   code. The full message is:
    `PHP Parse error: syntax error, unexpected 'const'(
   T_CONST), expecting variable (T_VARIABLE) in /var/www/wp-content/plugins/wp-performance-
   pack/modules/l10n_improvements/class.wppp_mo_dynamic.php on line 45`
 *     ```
       class WPPP_MO_dynamic extends Gettext_Translations {
       	private const PLURAL_SEP = "\x00"; // << THIS
       ```
   
 * I guess visibility modifiers for const were introduced in php 7.1. Please see
   [https://www.php.net/manual/en/language.oop5.constants.php#language.oop5.basic.class.this](https://www.php.net/manual/en/language.oop5.constants.php#language.oop5.basic.class.this)
 * I recommend removing private in favour of compatibility.
    -  This topic was modified 6 years, 6 months ago by [No3x](https://wordpress.org/support/users/no3x/).
    -  This topic was modified 6 years, 6 months ago by [No3x](https://wordpress.org/support/users/no3x/).
    -  This topic was modified 6 years, 6 months ago by [No3x](https://wordpress.org/support/users/no3x/).

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

 *  Plugin Author [Bjoern](https://wordpress.org/support/users/greencp/)
 * (@greencp)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-const-t_const/#post-12230428)
 * Thanks for the hint. Fixed this with 2.1.3.
 *  Thread Starter [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-const-t_const/#post-12232713)
 * Works. Thanks for your support.

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

The topic ‘PHP Parse error: syntax error, unexpected ‘const’ (T_CONST)’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-performance-pack_6d9fb6.svg)
 * [WP Performance Pack](https://wordpress.org/plugins/wp-performance-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-performance-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-performance-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-performance-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-performance-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-performance-pack/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [No3x](https://wordpress.org/support/users/no3x/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-const-t_const/#post-12232713)
 * Status: resolved