Title: PHP7 compatibility
Last modified: August 30, 2016

---

# PHP7 compatibility

 *  Resolved [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/php7-compatibility-4/)
 * Hello,
 * Could you update the following in `server-ip-memory-usage/server-ip-memory-usage.
   php` on line 30:
 * `function ip_address_memory_usage() {`
 * To:
 * `public function __construct() {`
    I believe the public statement is optional.
 * This will remove a PHP7 deprecation warning 🙂 In the future this will be the
   standard.
 * Thank you very much for your time and input! Your plugin helps me write better
   code 🙂
 * [https://wordpress.org/plugins/server-ip-memory-usage/](https://wordpress.org/plugins/server-ip-memory-usage/)

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

 *  Plugin Author [apasionados](https://wordpress.org/support/users/apasionados/)
 * (@apasionados)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/php7-compatibility-4/#post-6537787)
 * Hi Sybre,
 * Thanks for pointing this out. We have just changed it and the new version should
   be available right now (version 1.1.0).
 * We had been doubting to make changes to the deprecated PHP 4 constructors because
   of compatibility issues with the different PHP versions.
 * Using the `public function __construct() {` seems to be compatible with PHP 5.2.14–
   5.2.17, 5.3.3 – 5.6, PHP 7 and PHP 8; but raises an `E_STRICT "Redefining already
   defined constructor"` error in versions PHP 5.0.0 – 5.2.13, 5.3.0 – 5.3.2. ([Remove PHP 4 Constructors](https://wiki.php.net/rfc/remove_php4_constructors).
 * Thanks and best regards.
 *  Thread Starter [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/php7-compatibility-4/#post-6537789)
 * Hi [@apasionados](https://wordpress.org/support/users/apasionados/),
 * The link you’ve provided is interesting. Thanks!
 * Also many thanks for updating 🙂
 * I don’t think you’ll have to worry about deprecated PHP versions, since WordPress
   themselves have deprecated them too. [https://make.wordpress.org/core/2015/07/02/deprecating-php4-style-constructors-in-wordpress-4-3/](https://make.wordpress.org/core/2015/07/02/deprecating-php4-style-constructors-in-wordpress-4-3/)
 * Not to mention PHP 5.2 has been deprecated for a good 4 years already by The 
   PHP Group.
    [http://php.net/eol.php](http://php.net/eol.php)
 * Hosting parties should upgrade too for security reasons, if they haven’t then
   it’s best to stay away from them.
 * I believe that users whom update a plugin will also update the core. Those who
   don’t I believe have a deserted website or company.
 * Thanks 🙂
 *  [mln83](https://wordpress.org/support/users/mln83/)
 * (@mln83)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/php7-compatibility-4/#post-6537934)
 * With the most recent update (5 months ago) has it been made compatible with PHP
   7?
 * Thank you in advance. 🙂
 * Best regards,
    Michael
 *  Thread Starter [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/php7-compatibility-4/#post-6537935)
 * Hi Michael,
 * For as far as I can recall, it always has been PHP7 compatible. It’s just that
   the constructor was going to be deprecated – yet it’s still functional.
 * apasionados has since released an update (quite long ago) which uses the new 
   style. I’m still using it on my test server without any issues. Go ahead and 
   good luck! 🙂
 *  Plugin Author [apasionados](https://wordpress.org/support/users/apasionados/)
 * (@apasionados)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/php7-compatibility-4/#post-6537936)
 * Hi Michael and Sybre,
 * The plugin is compatible with PHP7 which we are running on all our sites.
 * Today we released an update regarding the IP address on servers with IIS where
   the IP was not shown and a warning was shown with DEBUG on.
 * Best regards and have a great weekend.
 * Ramón.

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

The topic ‘PHP7 compatibility’ is closed to new replies.

 * ![](https://ps.w.org/server-ip-memory-usage/assets/icon-128x128.png?rev=982864)
 * [Server IP & Memory Usage Display](https://wordpress.org/plugins/server-ip-memory-usage/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/server-ip-memory-usage/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/server-ip-memory-usage/)
 * [Active Topics](https://wordpress.org/support/plugin/server-ip-memory-usage/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/server-ip-memory-usage/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/server-ip-memory-usage/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [apasionados](https://wordpress.org/support/users/apasionados/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/php7-compatibility-4/#post-6537936)
 * Status: resolved