Title: PHP 7+ (7.2) Compatability
Last modified: January 19, 2018

---

# PHP 7+ (7.2) Compatability

 *  [Frank](https://wordpress.org/support/users/fmacdonald/)
 * (@fmacdonald)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-7-7-2-compatability/)
 * Hello, i tested this plugins compatibility with php 7.2 using the PHP compatibility
   check plugin and it appears there are several errors that would need to be addressed
   before we can use this on php 7. I’d be grateful if you could let me know if 
   you plan to make the plugin compatible and if so roughly when. results were as
   follows:
 * FILE: /home/*/public_html/wp-content/plugins/social-networks-auto-poster-facebook-
   twitter-g/inc/nxs_class_flt.php
    ——————————————————————————————————————— FOUND
   0 ERRORS AND 1 WARNING AFFECTING 1 LINE ———————————————————————————————————————
   268 | WARNING | Function create_function() is deprecated since PHP 7.2; Use an
   anonymous function instead ———————————————————————————————————————
 * FILE: /home/*/public_html/wp-content/plugins/social-networks-auto-poster-facebook-
   twitter-g/inc/nxs_functions_adv.php
    ————————————————————————————————————————-
   FOUND 1 ERROR AFFECTING 1 LINE ————————————————————————————————————————- 308 
   | ERROR | Using ‘break’ outside of a loop or switch structure is invalid and 
   will throw a fatal error since PHP 7.0 ————————————————————————————————————————-
 * FILE: /home/*/public_html/wp-content/plugins/social-networks-auto-poster-facebook-
   twitter-g/inc/nxs_class_snap.php
    ———————————————————————————————————————————————————————————————
   FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES ———————————————————————————————————————————————————————————————
   160 | ERROR | Using ‘break’ outside of a loop or switch structure is invalid 
   and will throw a fatal error since PHP 7.0 1107 | WARNING | The “result” parameter
   for function parse_str() is missing. Passing this parameter is no longer optional.
   The optional nature of the parameter is deprecated since PHP 7.2 ———————————————————————————————————————————————————————————————
 * FILE: /home/*/public_html/wp-content/plugins/social-networks-auto-poster-facebook-
   twitter-g/inc/nxs_functions_engine.php
    —————————————————————————————————————————-
   FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE —————————————————————————————————————————-
   209 | WARNING | Function create_function() is deprecated since PHP 7.2; Use an
   anonymous function instead —————————————————————————————————————————-
 * FILE: /home/*/public_html/wp-content/plugins/social-networks-auto-poster-facebook-
   twitter-g/inc/nxs_functions.php
    ——————————————————————————————————————— FOUND
   2 ERRORS AND 1 WARNING AFFECTING 3 LINES ———————————————————————————————————————
   30 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed
   since PHP 7.0 31 | ERROR | preg_replace() – /e modifier is deprecated since PHP
   5.5 and removed since PHP 7.0 80 | WARNING | Function create_function() is deprecated
   since PHP 7.2; Use an anonymous function instead ———————————————————————————————————————
 * FILE: /home/*/public_html/wp-content/plugins/social-networks-auto-poster-facebook-
   twitter-g/inc-cl/st.api.php
    —————————————————————————————————————– FOUND 0 ERRORS
   AND 1 WARNING AFFECTING 1 LINE —————————————————————————————————————– 82 | WARNING
   | Function create_function() is deprecated since PHP 7.2; Use an anonymous function
   instead —————————————————————————————————————–
 * FILE: /home/*/public_html/wp-content/plugins/social-networks-auto-poster-facebook-
   twitter-g/inc-cl/vk.api.php
    —————————————————————————————————————– FOUND 0 ERRORS
   AND 1 WARNING AFFECTING 1 LINE —————————————————————————————————————– 28 | WARNING
   | Function create_function() is deprecated since PHP 7.2; Use an anonymous function
   instead —————————————————————————————————————–
 * FILE: /home/*/public_html/wp-content/plugins/social-networks-auto-poster-facebook-
   twitter-g/inc-cl/fl.api.php
    —————————————————————————————————————– FOUND 0 ERRORS
   AND 1 WARNING AFFECTING 1 LINE —————————————————————————————————————– 40 | WARNING
   | Function create_function() is deprecated since PHP 7.2; Use an anonymous function
   instead —————————————————————————————————————–
 * FILE: /home/*/public_html/wp-content/plugins/social-networks-auto-poster-facebook-
   twitter-g/inc-cl/fp.api.php
    —————————————————————————————————————– FOUND 0 ERRORS
   AND 1 WARNING AFFECTING 1 LINE —————————————————————————————————————– 46 | WARNING
   | Function create_function() is deprecated since PHP 7.2; Use an anonymous function
   instead —————————————————————————————————————–

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

 *  [StephenMax](https://wordpress.org/support/users/stephenmax/)
 * (@stephenmax)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-7-7-2-compatability/#post-9881645)
 * I just checked the same way for PHP 7.1 and this also failed. Would be interested
   to hear feedback from the developer. (PHP 7.0 is ok)
 *  Plugin Author [NextScripts](https://wordpress.org/support/users/nextscripts/)
 * (@nextscripts)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-7-7-2-compatability/#post-9882673)
 * When PHP 7 was originally released about a year a go there were dozens of forum
   threads similar to this one here.
 * For example:
    [https://wordpress.org/support/topic/php7-compatibility-49/](https://wordpress.org/support/topic/php7-compatibility-49/)
 * The conclusion is that tool that you used is not that smart and it generates 
   a lot of false positives.
 * SNAP is 100% compatible with PHP 7, 7.1 and 7.2
 *  [StephenMax](https://wordpress.org/support/users/stephenmax/)
 * (@stephenmax)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-7-7-2-compatability/#post-9882690)
 * Good to know, thanks
 *  [vipz1](https://wordpress.org/support/users/vipz1/)
 * (@vipz1)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-7-7-2-compatability/#post-9913645)
 * as luck would have it, i have just installed the plugin, but cannot activate 
   it due to an error that is apparently a false positive.
 * so unless the plugin is actually activated and i just cant find it then it seems
   that they are NOT just false positives.
 * heres what i get:
 *     ```
       Plugin could not be activated because it triggered a fatal error.
   
       Fatal error: Cannot redeclare class NXS_HtmlFixer in /home/*/public_html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_functions.php on line 209
       ```
   
    -  This reply was modified 8 years, 4 months ago by [vipz1](https://wordpress.org/support/users/vipz1/).

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

The topic ‘PHP 7+ (7.2) Compatability’ 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

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

 * 4 replies
 * 4 participants
 * Last reply from: [vipz1](https://wordpress.org/support/users/vipz1/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/php-7-7-2-compatability/#post-9913645)
 * Status: not resolved