Title: PHP7 Compatibility
Last modified: November 28, 2016

---

# PHP7 Compatibility

 *  Resolved [plumski](https://wordpress.org/support/users/plumski/)
 * (@plumski)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php7-compatibility-49/)
 * Hi
 * I’m running Version 3.7.7 on WP 4.6.1
 * The WP Engine compatibility checker is throwing up this error:
 * ———-
 * FILE: /nas/content/live/blogdecortiles/wp-content/plugins/social-networks-auto-
   poster-facebook-twitter-g/inc/nxs_snap_class.php
    ——————————————————————————————————————————-
   FOUND 1 ERROR AFFECTING 1 LINE ——————————————————————————————————————————- 238
   | ERROR | Using ‘break’ outside of a loop or switch structure is invalid and 
   will throw a fatal error since PHP 7.0 ——————————————————————————————————————————-
 * ———-
 * All advice appreciated.
 * Chris

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

 *  Plugin Author [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * (@nextscripts)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php7-compatibility-49/#post-8490784)
 * **SNAP is 100% PHP 7 compatible.**
 * That checker is not so good. It can’t properly analyze the code and generates
   a lot of false positives.
 * Line 238:
 *     ```
       foreach ($nxs_snapAvNts as $avNt) 
         if (count($options[$avNt['lcode']])>0) 
           {
             $isNoNts = false; 
             break;
           } 
       ```
   
 * So as you can see “break” is properly used INSIDE the “foreach” loop. Your tool
   just misdiagnosed it because of the “if” statement that it can’t understand.
    -  This reply was modified 9 years, 6 months ago by [NextScripts](https://wordpress.org/support/users/nextscripts/).
 *  Thread Starter [plumski](https://wordpress.org/support/users/plumski/)
 * (@plumski)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php7-compatibility-49/#post-8497081)
 * Thank you, I appreciate the feedback and confirmation that all is well.
 *  [tarun80](https://wordpress.org/support/users/tarun80/)
 * (@tarun80)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/php7-compatibility-49/#post-8511863)
 * Thanks for posting this. I came searching for the same information. This might
   be worth pinning or announcing in case others use that same plugin to check for
   PHP7 compatibility?

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

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

 * ![](https://ps.w.org/social-networks-auto-poster-facebook-twitter-g/assets/icon-
   256x256.png?rev=1106267)
 * [NextScripts: Social Networks Auto-Poster](https://wordpress.org/plugins/social-networks-auto-poster-facebook-twitter-g/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/social-networks-auto-poster-facebook-twitter-g/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/)
 * [Active Topics](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/social-networks-auto-poster-facebook-twitter-g/reviews/)

## Tags

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

 * 3 replies
 * 3 participants
 * Last reply from: [tarun80](https://wordpress.org/support/users/tarun80/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/php7-compatibility-49/#post-8511863)
 * Status: resolved