Title: PHP7 compatibility
Last modified: September 1, 2016

---

# PHP7 compatibility

 *  [Torsten Landsiedel](https://wordpress.org/support/users/zodiac1978/)
 * (@zodiac1978)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/php7-compatibility-33/)
 * Hi!
 * I’ve tested all my plugins with this PHP linter:
    [https://wordpress.org/plugins/php-compatibility-checker/](https://wordpress.org/plugins/php-compatibility-checker/)
 * Unfortunately I found a problem with your plugin:
 * > FILE: /wp-content/plugins/daves-wordpress-live-search/class-daves-wordpress-
   > live-search-results.php
   >  ———————————————————————- FOUND 1 ERROR AFFECTING 1
   > LINE ———————————————————————- 155 | ERROR | Deprecated PHP4 style constructor
   > are not supported since PHP7 ———————————————————————-
 * Would be great if you can fix this!
 * All the best,
    Torsten
 * [https://wordpress.org/plugins/daves-wordpress-live-search/](https://wordpress.org/plugins/daves-wordpress-live-search/)

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

 *  [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/php7-compatibility-33/#post-7630102)
 * Hi Torsten,
    I switched to PHP 7 today and and fixed the incompatibility issue
   this by opening `/daves-wordpress-live-search/DavesWordPressLiveSearchResults.
   php` and navigating to line 326, replacing `$wp =& new WP();` with `$wp = new
   WP();` best, Robert
 *  Thread Starter [Torsten Landsiedel](https://wordpress.org/support/users/zodiac1978/)
 * (@zodiac1978)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/php7-compatibility-33/#post-7630129)
 * ???
 * I think according to this post:
    [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/)
 * you should change in line 21:
    `function DavesWordPressLiveSearchResults( $searchTerms,
   $displayPostMeta = true ) {`
 * to:
    `function __constructor( $searchTerms, $displayPostMeta = true ) {`
 * All the best,
    Torsten
 *  Plugin Author [Dana Ross](https://wordpress.org/support/users/csixty4/)
 * (@csixty4)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php7-compatibility-33/#post-7630193)
 * Thanks for the heads-up about this. I’ll have a new version out tonight that 
   fixes this.

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/daves-wordpress-live-search_daad6f.
   svg)
 * [Dave's WordPress Live Search](https://wordpress.org/plugins/daves-wordpress-live-search/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/daves-wordpress-live-search/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/daves-wordpress-live-search/)
 * [Active Topics](https://wordpress.org/support/plugin/daves-wordpress-live-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/daves-wordpress-live-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/daves-wordpress-live-search/reviews/)

## Tags

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

 * 3 replies
 * 3 participants
 * Last reply from: [Dana Ross](https://wordpress.org/support/users/csixty4/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/php7-compatibility-33/#post-7630193)
 * Status: not resolved