Title: PHP 7 compatibility
Last modified: October 14, 2016

---

# PHP 7 compatibility

 *  Resolved [kadabram](https://wordpress.org/support/users/kadabram/)
 * (@kadabram)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-7-compatibility-84/)
 * Hello,
 * I use your plugin (Version 10.3) and it is amazing! I love it! Thanks for your
   work on this product!
 * I am trying to make my website fully PHP7 compliant and to avoid conflicts between
   my plugins and my theme, so I used “WP Engine PHP Compatibility Checker” to test
   all of my plugins.
 * I noticed some issues within WP Statistics.
 * I would be very happy if you could fix them. Thanks a lot!
 * Here they are:
    FILE: /wp-content/plugins/wp-statistics/vendor/browscap/browscap-
   php/src/phpbrowscap/Browscap.php ———————————————————————————————————————- FOUND
   2 ERRORS AFFECTING 2 LINES ———————————————————————————————————————- 672 | ERROR
   | preg_replace() – /e modifier is forbidden since PHP 7.0 787 | ERROR | preg_replace()–/
   e modifier is forbidden since PHP 7.0 ———————————————————————————————————————-
 * FILE: /wp-content/plugins/wp-statistics/includes/optimization/tabs/wps-optimization-
   resources.php
    ———————————————————————————————————————- FOUND 0 ERRORS AND 1 
   WARNING AFFECTING 1 LINE ———————————————————————————————————————- 151 | WARNING
   | INI directive ‘safe_mode’ is deprecated from PHP 5.3 and forbidden from PHP
   5.4. ———————————————————————————————————————-
 * FILE: /wp-content/plugins/wp-statistics/includes/settings/tabs/wps-externals.
   php
    —————————————————————————————————– FOUND 0 ERRORS AND 1 WARNING AFFECTING
   1 LINE —————————————————————————————————– 150 | WARNING | INI directive ‘safe_mode’
   is deprecated from PHP 5.3 and forbidden from PHP 5.4. —————————————————————————————————–
 * FILE: /wp-content/plugins/wp-statistics/includes/functions/functions.php
    ————————————————————————————————–
   FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ————————————————————————————————–
   952 | WARNING | INI directive ‘safe_mode’ is deprecated from PHP 5.3 and forbidden
   from PHP 5.4. ————————————————————————————————–

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

 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-7-compatibility-84/#post-8298649)
 * The problem with automated scanners is that they are often wrong or have no context
   about the usage.
 * The first issue (the regex) is a false positive, the regex on those lines do 
   not use `/e`.
 * The others have no context as we still support PHP 5.3 so we have to check for
   safe mode so the code is correct, it just has no impact on PHP 7 as we also check
   for newer versions of PHP and only conditionally use the code.
 *  Thread Starter [kadabram](https://wordpress.org/support/users/kadabram/)
 * (@kadabram)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-7-compatibility-84/#post-8298916)
 * Thank you!

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

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

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [compatibility](https://wordpress.org/support/topic-tag/compatibility/)
 * [errors](https://wordpress.org/support/topic-tag/errors/)
 * [Issues](https://wordpress.org/support/topic-tag/issues/)
 * [php-7](https://wordpress.org/support/topic-tag/php-7/)

 * 2 replies
 * 2 participants
 * Last reply from: [kadabram](https://wordpress.org/support/users/kadabram/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/php-7-compatibility-84/#post-8298916)
 * Status: resolved