Title: Parse error: syntax error, unexpected &#8216;clone&#8217; (T_CLONE), expecting identifier (T
Last modified: December 15, 2017

---

# Parse error: syntax error, unexpected ‘clone’ (T_CLONE), expecting identifier (T

 *  Resolved [jodybethw](https://wordpress.org/support/users/jodybethw/)
 * (@jodybethw)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clone-t_clone-expecting-identifier-t/)
 * I am using the latest version of the plugin (5.8.1.20). When trying to activate
   the plugin, I got this error:
 * `Parse error: syntax error, unexpected 'clone' (T_CLONE), expecting identifier(
   T_STRING) in /home/shalomraleigh/public_html/wp-content/plugins/events-manager/
   classes/em-datetime.php on line 156`
 * This prevented the plugin from being activated. So I have removed this entire
   section, which includes line 156:
    `/** * Easy chainable cloning function, useful
   for situations where you may want to manipulate the current date, * such as adding
   a month and getting the DATETIME string without changing the original value of
   this object. * [@return](https://wordpress.org/support/users/return/) EM_DateTime*/
   public function clone(){ return clone $this; }` Now the plugin activates. But
   I am worried that when I upgrade to the next version, I will get this error all
   over again and the plugin will not work. Is this section of code important to
   the plugin functioning properly? Do I need to do something on my end to fix the
   error, or is it just a bug?
    -  This topic was modified 8 years, 6 months ago by [jodybethw](https://wordpress.org/support/users/jodybethw/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fparse-error-syntax-error-unexpected-clone-t_clone-expecting-identifier-t%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clone-t_clone-expecting-identifier-t/#post-9784675)
 * I get this too, I’ve let the devs know about it. should get fixed soon.
 *  Thread Starter [jodybethw](https://wordpress.org/support/users/jodybethw/)
 * (@jodybethw)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clone-t_clone-expecting-identifier-t/#post-9786552)
 * Thanks!
 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clone-t_clone-expecting-identifier-t/#post-9786889)
 * The next Dev version, which should be released soon, will contain a fix for this
   issue.
 *  [grahamix](https://wordpress.org/support/users/grahamix/)
 * (@grahamix)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clone-t_clone-expecting-identifier-t/#post-9788728)
 * Ditto – giving the White Screen of Death:
 * 2017/12/15 11:03:13 [error] 25415#25415: *580030 FastCGI sent in stderr: “PHP
   message: PHP Parse error: syntax error, unexpected ‘clone’ (T_CLONE), expecting
   identifier (T_STRING) in /var/www/html/www.victoriahislop.com/cms/wp-content/
   plugins/events-manager/classes/em-datetime.php on line 156
 * nginx/1.10.3 (Ubuntu)
    PHP 5.6.32-1+ubuntu16.04.1+deb.sury.org+1 (cli) mysql 
   Ver 14.14 Distrib 5.7.20, for Linux (x86_64)
 * …with Cloudflare running in front
 * I had to rename the plugin folder to get the site back.
 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clone-t_clone-expecting-identifier-t/#post-9797353)
 * This problem has now been fixed. Can you test with the latest Dev version?

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

The topic ‘Parse error: syntax error, unexpected ‘clone’ (T_CLONE), expecting identifier(
T’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clone-t_clone-expecting-identifier-t/#post-9797353)
 * Status: resolved