Title: PHP7 Compatibility EASY FIX use __construct()
Last modified: September 1, 2016

---

# PHP7 Compatibility EASY FIX use __construct()

 *  Resolved [Jer Clarke](https://wordpress.org/support/users/jeremyclarke/)
 * (@jeremyclarke)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/php7-compatibility-easy-fix-use-_construct-1/)
 * Hi, there’s a small but important bug in your code as interepreted by PHP7:
 * > Deprecated: Methods with the same name as their class will not be constructors
   > in a future version of PHP; mailchimpSF_Widget has a deprecated constructor
   > in /SITE/wp-content/plugins/mailchimp/mailchimp_widget.php on line 473
 * All you need to do to fix it is use `__construct()` rather than the class name
   in the constructor function for your classes:
 *     ```
       class mailchimpSF_Widget extends WP_Widget {
   
       //	function mailchimpSF_Widget() {
       	function __construct() {
       ```
   
 * WordPress already uses this format throughout the codebase, so it’s a safe bet.
   PHP7 is going to skyrocket in popularity soon so please fix this ASAP to avoid
   it being a hassle for other users. The deprecation notice shows/is-generated 
   on all pages across the site, so it’s extremely noisy.
 * Thanks!
 * [https://wordpress.org/plugins/mailchimp/](https://wordpress.org/plugins/mailchimp/)

Viewing 1 replies (of 1 total)

 *  [mcsupport](https://wordpress.org/support/users/mcsupport/)
 * (@mcsupport)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/php7-compatibility-easy-fix-use-_construct-1/#post-7649709)
 * Hey there,
 * Thanks for passing that along – we will take a look into this.
 * Thanks!
 * Pearl

Viewing 1 replies (of 1 total)

The topic ‘PHP7 Compatibility EASY FIX use __construct()’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp/assets/icon.svg?rev=3156997)
 * [Mailchimp List Subscribe Form](https://wordpress.org/plugins/mailchimp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp/reviews/)

## Tags

 * [PHP7](https://wordpress.org/support/topic-tag/php7/)

 * 1 reply
 * 2 participants
 * Last reply from: [mcsupport](https://wordpress.org/support/users/mcsupport/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/php7-compatibility-easy-fix-use-_construct-1/#post-7649709)
 * Status: resolved