Title: Parse error: syntax error, unexpected:
Last modified: January 19, 2018

---

# Parse error: syntax error, unexpected:

 *  Resolved [mrliamborg](https://wordpress.org/support/users/mrliamborg/)
 * (@mrliamborg)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/)
 * Hey, I have downloaded your plugin. I have click activate and it comes up with
   this error code:
 * *** Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in /home/socialw1/
   public_html/wp-content/plugins/cryptocurrency/cryptocurrency.php on line 23 ***
 * Is this the first time you have seen this? I have also tried to download the 
   plugin on another two different sites of mine but it’s coming up with the same
   error code.
 * Thanks
    Liam

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

 *  Plugin Author [Mat Gargano](https://wordpress.org/support/users/matstars/)
 * (@matstars)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9883638)
 * Ah. I am willing to bet your host is using a version of PHP < 5.4
 * PHP 5.3 stopped being supported on August 14, 2014 — can you see if your host
   will upgrade your PHP version?
 *  Thread Starter [mrliamborg](https://wordpress.org/support/users/mrliamborg/)
 * (@mrliamborg)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9887450)
 * I will get onto that now and give you an update when finished.
 * Thanks
 *  Thread Starter [mrliamborg](https://wordpress.org/support/users/mrliamborg/)
 * (@mrliamborg)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9887523)
 * Hey Mat,
 * I have got my hosting provider to upgraded my PHP version to 5.6
    The plugin 
   still doesn’t work… what do you think the problem is?
 * Thanks
    Liam
 *  Plugin Author [Mat Gargano](https://wordpress.org/support/users/matstars/)
 * (@matstars)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9887524)
 * What’s the error now?
 *  Thread Starter [mrliamborg](https://wordpress.org/support/users/mrliamborg/)
 * (@mrliamborg)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9887540)
 * The error code is: “Parse error: syntax error, unexpected ‘class’ (T_CLASS), 
   expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘in/home/socialw1/
   public_html/wpcontent/plugins/cryptocurrency1/vendor/htmlburger/carbon-field-
   number/field.php on line 7”.
 *  Plugin Author [Mat Gargano](https://wordpress.org/support/users/matstars/)
 * (@matstars)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9887555)
 * Ok I’ll take a look tomorrow and get back to you. This seems to be an issue with
   carbonfields which is a dependency and not my plugin directly.
 *  Thread Starter [mrliamborg](https://wordpress.org/support/users/mrliamborg/)
 * (@mrliamborg)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9887557)
 * Thank you.
 * Speak soon!
 *  Plugin Author [Mat Gargano](https://wordpress.org/support/users/matstars/)
 * (@matstars)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9887558)
 * Can you confirm your version of PHP and phpinfo by installing [https://wordpress.org/plugins/wordpress-php-info/](https://wordpress.org/plugins/wordpress-php-info/)
   and emailing me the results? Read the plugins FAQ. My email is my mgargano plus
   at symbol plus gmail d0t com
 * I ask this because – [https://carbonfields.net/faq/](https://carbonfields.net/faq/)
   scroll down to errors and issues
 * I keep getting a “Parse error: syntax error, unexpected T_STRING” error. How 
   can I fix it?
    You’re probably using PHP 5.2 or older. The Carbon Fields library
   uses PHP namespaces, which are only supported in PHP 5.3+.
 *  Thread Starter [mrliamborg](https://wordpress.org/support/users/mrliamborg/)
 * (@mrliamborg)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9891428)
 * Hi Mat,
 * I have emailed you.
    I downloaded the PHP plugin and it says: ***PHP Version:
   5.6.33***
 * Thanks
    Awaiting your reply.
 *  [daverius](https://wordpress.org/support/users/daverius/)
 * (@daverius)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9950477)
 * Have something similar related to Carbon Field in this plugin: Cant activate 
   plugin because of fatal error:
 * Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier(
   T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in /var/www/qb108104/data/www/
   davidriupassa.net/wp-content/plugins/cryptocurrency/vendor/htmlburger/carbon-
   field-number/field.php on line 7
 * I am on PHP version 5.4.45
    -  This reply was modified 8 years, 3 months ago by [daverius](https://wordpress.org/support/users/daverius/).
      Reason: added php version
 *  Plugin Author [Mat Gargano](https://wordpress.org/support/users/matstars/)
 * (@matstars)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9950486)
 * PHP 5.4 is end of lifed (see [http://php.net/supported-versions.php](http://php.net/supported-versions.php))
   any way to get it on a newer PHP?
 *  [daverius](https://wordpress.org/support/users/daverius/)
 * (@daverius)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9950642)
 * I’ll give it a try. Thanks!
 *  [daverius](https://wordpress.org/support/users/daverius/)
 * (@daverius)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9952280)
 * Updated to PHP version 7.1. Works fine now.
 *  Plugin Author [Mat Gargano](https://wordpress.org/support/users/matstars/)
 * (@matstars)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9952313)
 * Awesome! Great to hear.
 *  Plugin Author [Mat Gargano](https://wordpress.org/support/users/matstars/)
 * (@matstars)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9952325)
 * marking as resolved.

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/cryptocurrency_d5b885.svg)
 * [Cryptocurrency Portfolio Tracker](https://wordpress.org/plugins/cryptocurrency/)
 * [Support Threads](https://wordpress.org/support/plugin/cryptocurrency/)
 * [Active Topics](https://wordpress.org/support/plugin/cryptocurrency/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cryptocurrency/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cryptocurrency/reviews/)

 * 15 replies
 * 3 participants
 * Last reply from: [Mat Gargano](https://wordpress.org/support/users/matstars/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-215/#post-9952325)
 * Status: resolved