Title: PHP 7 Compatibility
Last modified: July 10, 2017

---

# PHP 7 Compatibility

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/php-7-compatibility-163/)
 * I ran the PHP Compatibility Checker plugin [https://wordpress.org/plugins/php-compatibility-checker/](https://wordpress.org/plugins/php-compatibility-checker/)
   
   checking for PHP 7 compatibility and got this result for this plugin:
 *     ```
       FILE: wp-content/plugins/wp-invoice/vendor/usabilitydynamics/lib-utility/lib/class-utility.php
       -------------------------------------------------------------------------------------
       FOUND 1 ERROR AFFECTING 1 LINE
       -------------------------------------------------------------------------------------
        508 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
       -------------------------------------------------------------------------------------
   
       FILE: wp-content/plugins/wp-invoice/lib/third-party/stripe/lib/Stripe/Object.php
       -------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
       -------------------------------------------------------------------------------------
        156 | WARNING | Method name "Stripe_Object::__toJSON" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
        169 | WARNING | Method name "Stripe_Object::__toArray" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
       -------------------------------------------------------------------------------------
       ```
   

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

 *  Plugin Contributor [MariaKravchenko](https://wordpress.org/support/users/mariakravchenko/)
 * (@mariakravchenko)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/php-7-compatibility-163/#post-9308314)
 * Hello.
 * Thank you for pointing.
 * Do you have our plugin on your site or just going to install?
 * Those warnings are not harmful and shouldn’t prevent plugin to work.
 * Regarding `ERROR | preg_replace()` I have found that it is an issue of the compatibility
   checker plugin not the issue of the php7 itself. you can check the support ticket
   raised by another person for the compatibility checker plugin
    [https://wordpress.org/support/topic/php7-compatibility-70/](https://wordpress.org/support/topic/php7-compatibility-70/)
 * in above URL author says
 * > No need to worry, wp-Typography has never used the /e modifier and is 100 percent
   > compatible with PHP 7.x
 * Regards.
 *  Thread Starter [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/php-7-compatibility-163/#post-9308911)
 * > Do you have our plugin on your site or just going to install?
 * I have a client that is using WP-Invoice on their site, which I am intending 
   to migrate to PHP 7.
 * > Regarding `ERROR | preg_replace()` I have found that it is an issue of the 
   > compatibility checker plugin not the issue of the php7 itself.
 * Not so. I looked at the code that was flagged, and indeed it does have `preg_replace()`
   with the `e` modifier. Your reference to some other plugin as not using it has
   nothing to do with this plugin, which _is_ using it.
    The line in question is`
   return preg_replace( '!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $
   input );`
 * I understand that the warnings are just warnings, but hope you are aware that
   the code is using a reserved naming convention.
 *  Plugin Contributor [MariaKravchenko](https://wordpress.org/support/users/mariakravchenko/)
 * (@mariakravchenko)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/php-7-compatibility-163/#post-9311548)
 * Thank you for pointing. We will clean our code from those warnings up to next
   release.
 *  [domenico.latosa](https://wordpress.org/support/users/domenicolatosa/)
 * (@domenicolatosa)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-7-compatibility-163/#post-9470047)
 * Hello,
 * So WP Invoice is now fully compatible with php7?
 * Thank you 🙂
 *  Thread Starter [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-7-compatibility-163/#post-9470680)
 * [@domenicolatosa](https://wordpress.org/support/users/domenicolatosa/)
    No, no
   changes for PHP 7 compatibility were made in version 4.1.8. It still has the 
   1 error and 2 warnings.
 *  Plugin Contributor [MariaKravchenko](https://wordpress.org/support/users/mariakravchenko/)
 * (@mariakravchenko)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-7-compatibility-163/#post-9470789)
 * Hello [@domenicolatosa](https://wordpress.org/support/users/domenicolatosa/)
 * We are using our products on PHP 7 servers. Mentioned warnings do not prevent
   to work our plugin as expected. But those fixes in our road map for next releases,
   [@joyously](https://wordpress.org/support/users/joyously/)
 * Regards.

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

The topic ‘PHP 7 Compatibility’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-invoice_c36510.svg)
 * [WP-Invoice - Web Invoice and Billing](https://wordpress.org/plugins/wp-invoice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-invoice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-invoice/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-invoice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-invoice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-invoice/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [MariaKravchenko](https://wordpress.org/support/users/mariakravchenko/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/php-7-compatibility-163/#post-9470789)
 * Status: not resolved