Title: Plugin breaks with php 7.3
Last modified: September 6, 2019

---

# Plugin breaks with php 7.3

 *  [baseapp](https://wordpress.org/support/users/baseapp/)
 * (@baseapp)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/plugin-breaks-with-php-7-3/)
 * Hi the plugin breaks with PHP 7.3
 * I found that updating the line 340 in file ‘wp-content/plugins/crayon-syntax-
   highlighter/crayon_langs.class.php’
 * to
 *  return preg_replace(‘/[^\w\-+#]/msi’, ”, $id);
 * fixes the issue

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

 *  [vovastik](https://wordpress.org/support/users/vovastik/)
 * (@vovastik)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/plugin-breaks-with-php-7-3/#post-11915836)
 * You genius! Thank you!
 *  [Mariusz Szatkowski](https://wordpress.org/support/users/motylanogha/)
 * (@motylanogha)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/plugin-breaks-with-php-7-3/#post-12008494)
 * Thanks for the hint!
 *  [knittingtheweb](https://wordpress.org/support/users/knittingtheweb/)
 * (@knittingtheweb)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/plugin-breaks-with-php-7-3/#post-12035663)
 * [@baseapp](https://wordpress.org/support/users/baseapp/) You are my hero! I was
   desperately trying to find a replacement for Crayon Syntax Highlighter after 
   I realized it breaks with PHP 7.3. I would never have figured out that a single
   backslash would fix the issue. THANK YOU for sharing your knowledge with us! 
   Now if only someone would adopt this plugin …
 *  [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/plugin-breaks-with-php-7-3/#post-12058534)
 * [@baseapp](https://wordpress.org/support/users/baseapp/) Thank you! Please post
   your donate link!
 *  [samgh](https://wordpress.org/support/users/samgh/)
 * (@samgh)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/plugin-breaks-with-php-7-3/#post-12164934)
 * For me, at least, I needed to do it with doublequotes. Here’s the version that
   worked for me:
 * `return preg_replace("/[^\w\-+#]/msi", '', $id);`
 *  [Noah Hearle](https://wordpress.org/support/users/designextreme/)
 * (@designextreme)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/plugin-breaks-with-php-7-3/#post-12202424)
 * Thanks!
 * Code version works:
 * `return preg_replace('/[^\w\-+#]/msi', '', $id);`
    -  This reply was modified 6 years, 5 months ago by [Noah Hearle](https://wordpress.org/support/users/designextreme/).
 *  [bhosting](https://wordpress.org/support/users/bhosting/)
 * (@bhosting)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/plugin-breaks-with-php-7-3/#post-12269742)
 * [@samgh](https://wordpress.org/support/users/samgh/) suggestion worked for me.
 * `return preg_replace("/[^\w\-+#]/msi", '', $id);`
 *  [mobeigi](https://wordpress.org/support/users/mobeigi/)
 * (@mobeigi)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/plugin-breaks-with-php-7-3/#post-12311930)
 * Awesome! Thanks for sharing all.

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

The topic ‘Plugin breaks with php 7.3’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/crayon-syntax-highlighter_b0c4c0.
   svg)
 * [Crayon Syntax Highlighter](https://wordpress.org/plugins/crayon-syntax-highlighter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/crayon-syntax-highlighter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/crayon-syntax-highlighter/)
 * [Active Topics](https://wordpress.org/support/plugin/crayon-syntax-highlighter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/crayon-syntax-highlighter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/crayon-syntax-highlighter/reviews/)

 * 8 replies
 * 4 participants
 * Last reply from: [mobeigi](https://wordpress.org/support/users/mobeigi/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/plugin-breaks-with-php-7-3/#post-12311930)
 * Status: not resolved