Title: version 2.2.2 Parse error: syntax error, unexpected
Last modified: April 6, 2022

---

# version 2.2.2 Parse error: syntax error, unexpected

 *  Resolved [bmunsch](https://wordpress.org/support/users/bmunsch/)
 * (@bmunsch)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/)
 * Hi,
    After install the last version of the plugin (2.2.2), I have an error : 
   Parse error: syntax error, unexpected ‘(‘ in /wp-content/plugins/amp/vendor/composer/
   autoload_real.php on line 32

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

 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15532143)
 * Hello [@bmunsch](https://wordpress.org/support/users/bmunsch/)
 * Thank you for the support topic, Can you please re-install AMP plugin and check
   if you are still facing the issue.
 * Additionally please send your site health information using [this form](https://forms.gle/wsVAxY4dghje5WvSA)
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15533646)
 * This is the line in question: [https://plugins.trac.wordpress.org/browser/amp/tags/2.2.2/vendor/composer/autoload_real.php#L32](https://plugins.trac.wordpress.org/browser/amp/tags/2.2.2/vendor/composer/autoload_real.php#L32)
 * `\Composer\Autoload\ComposerStaticInitf6b2e7006ad3ce9b7d99b34b61a60ad1::getInitializer(
   $loader)();`
 * What version of PHP are you using?
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15533664)
 * It appears that the Composer autoloader introduced new syntax that is not supported
   in PHP 5.6. This can be seen here: [https://3v4l.org/TKUqE](https://3v4l.org/TKUqE)
 * I can see the syntax here was changed when looking at the diff: [https://plugins.trac.wordpress.org/changeset/2705296/#file150](https://plugins.trac.wordpress.org/changeset/2705296/#file150)
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15533670)
 * I’m confused as to why this is the case since we included PHP 5.6 in the test
   matrix.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15533680)
 * [@bmunsch](https://wordpress.org/support/users/bmunsch/) while we investigate
   further, the quick fix would be to update to PHP 7+. This is recommended regardless
   since PHP 5.6 is no longer being maintained and PHP 7 (and now PHP 8) are much
   faster.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15533694)
 * Sure enough, when I try this build on a local environment running PHP 5.6 I also
   get an error.
 * I believe the issue is that the plugin was being built using PHP 5.6 on GitHub
   actions, and thus Composer was intentionally not using syntax which was not incompatible
   with PHP 5.6.
 *  Thread Starter [bmunsch](https://wordpress.org/support/users/bmunsch/)
 * (@bmunsch)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15533717)
 * [@milindmore22](https://wordpress.org/support/users/milindmore22/) I re-install
   plugin but I’ve got already an error.
    [@westonruter](https://wordpress.org/support/users/westonruter/)
   I use effectively PHP 5.6 Thanks you for your answers.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15534162)
 * I’ve just published 2.2.3 which includes the PHP 5.6 fix.
 *  Thread Starter [bmunsch](https://wordpress.org/support/users/bmunsch/)
 * (@bmunsch)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15535217)
 * [@westonruter](https://wordpress.org/support/users/westonruter/) Thank you very
   much, version 2.2.3 works fine on PHP 5.6.
 *  Thread Starter [bmunsch](https://wordpress.org/support/users/bmunsch/)
 * (@bmunsch)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15535283)
 * [@westonruter](https://wordpress.org/support/users/westonruter/) The title of
   the topic should be changed to explain this error only appears with PHP 5.6
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15537294)
 * Thanks. I can’t change the topic title, but it should be clear to anyone who 
   opens the topic.
 *  [distill](https://wordpress.org/support/users/distill/)
 * (@distill)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15590919)
 * For, me I get the same error for autoload_real.php row 32. The error is in another
   language, but it translates to E_PARSE. Error message: syntax error, unexpected‘(‘
 * When I go to phpMyAdmin, it clearly says:
    – PHP:n version: 7.3.33 – cpsrvd 11.100.0.12–
   libmysql – 5.6.43
 * Why is it happening also with PHP 7.3.33? (It breaks my site so that I can’t 
   access it, recovery mode doesn’t let me in either.) Thanks.
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15591577)
 * [@distill](https://wordpress.org/support/users/distill/)
 * Make sure you are using latest AMP plugin version (2.2.4), Please create a new
   [support topic](https://wordpress.org/support/plugin/amp/#new-topic-0), also 
   please share your site health info using [this form](https://forms.gle/wsVAxY4dghje5WvSA)

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

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

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 13 replies
 * 4 participants
 * Last reply from: [Milind More](https://wordpress.org/support/users/milindmore22/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/version-2-2-2-parse-error-syntax-error-unexpected/#post-15591577)
 * Status: resolved