Title: PHP 7 compatibility problem
Last modified: November 19, 2018

---

# PHP 7 compatibility problem

 *  Resolved [morvy](https://wordpress.org/support/users/morvy/)
 * (@morvy)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/php-7-compatibility-problem/)
 * PHP Deprecated: The each() function is deprecated. This message will be suppressed
   on further calls in /wp-content/plugins/similar-posts/similar-posts.php on line
   409

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

 *  [glashkoff](https://wordpress.org/support/users/glashkoff/)
 * (@glashkoff)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/php-7-compatibility-problem/#post-10993472)
 * Hey. I also use this plugin.
    Replace `while (list($n, $word) = each($wordlist)){`
   with `foreach ($wordlist as $word) {` For the plugin to work on PHP 7.2, you 
   also need to replace `$postid` with `$postID` in line 303 (`sp_save_index_entry`
   function) in similar-posts.php.
    -  This reply was modified 7 years, 5 months ago by [glashkoff](https://wordpress.org/support/users/glashkoff/).
 *  Plugin Author [Shareaholic](https://wordpress.org/support/users/shareaholic/)
 * (@shareaholic)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/php-7-compatibility-problem/#post-11211875)
 * [@glashkoff](https://wordpress.org/support/users/glashkoff/) [@morvy](https://wordpress.org/support/users/morvy/)
   thanks for the heads up! This will be fixed in the next release of the plugin
   later today.
 *  Plugin Author [Shareaholic](https://wordpress.org/support/users/shareaholic/)
 * (@shareaholic)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/php-7-compatibility-problem/#post-11212189)
 * Version 3.1.0 addresses the PHP 7.2 issues. Please give it a try! 🙂
 * [https://wordpress.org/plugins/similar-posts/#developers](https://wordpress.org/plugins/similar-posts/#developers)

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/similar-posts_34c5f7.svg)
 * [Similar Posts - Best Related Posts Plugin for WordPress](https://wordpress.org/plugins/similar-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/similar-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/similar-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/similar-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/similar-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/similar-posts/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Shareaholic](https://wordpress.org/support/users/shareaholic/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/php-7-compatibility-problem/#post-11212189)
 * Status: resolved