Title: PHP7 compatibility
Last modified: November 4, 2016

---

# PHP7 compatibility

 *  Resolved [Andy Keith](https://wordpress.org/support/users/andykeith/)
 * (@andykeith)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php7-compatibility-47/)
 * Using latest version of plugin. Most of the PHP7 compat errors have been fixed
   now. However, I’m still getting this one:
 * FILE: /wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/
   nxs_snap_class.php
    ————————————————————————————————— FOUND 1 ERROR AFFECTING
   1 LINE ————————————————————————————————— 234 | ERROR | Using ‘break’ outside 
   of a loop or switch structure is invalid and will throw a fatal error since PHP
   7.0 —————————————————————————————————
 * Are you able to fix this in the next version?
 * Thanks in advance,
 * Andy

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

 *  Plugin Author [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * (@nextscripts)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php7-compatibility-47/#post-8396371)
 * I am not sure what kind of tool you are using to check compatibility, but that
   tool is not so good.
 * Line 234:
 *     ```
       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.
 *  Thread Starter [Andy Keith](https://wordpress.org/support/users/andykeith/)
 * (@andykeith)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php7-compatibility-47/#post-8396542)
 * I’m using WPEngine’s PHP Compatability Checker – [https://wordpress.org/plugins/php-compatibility-checker/](https://wordpress.org/plugins/php-compatibility-checker/)
 * Looks like a false positive, like you say. Thanks for getting back to me so quickly.
   Feel free to mark as resolved.
 *  [CelsiusAnderson](https://wordpress.org/support/users/celsiusanderson/)
 * (@celsiusanderson)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php7-compatibility-47/#post-8417886)
 * And that false positive proved to be right today. Any site with SNAP and php7
   is now down. Error 500, getting from your last api update.
 *  Plugin Author [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * (@nextscripts)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php7-compatibility-47/#post-8418020)
 * That false positive has nothing to do with what happened today.
 *  Plugin Author [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * (@nextscripts)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php7-compatibility-47/#post-8420055)
 * We have posted the way to fix today’s issue (not the false positive) here: [https://wordpress.org/support/topic/error-in-php7-3/#post-8418385](https://wordpress.org/support/topic/error-in-php7-3/#post-8418385)

Viewing 5 replies - 1 through 5 (of 5 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/)

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