Title: PHP comaptibility error
Last modified: October 20, 2021

---

# PHP comaptibility error

 *  Resolved [Lea](https://wordpress.org/support/users/leac/)
 * (@leac)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-comaptibility-error/)
 * I ran a PHPCS compatibility check for PHP 7.4 and got the following errors:
 * > `FILE: /data/phpcs/staff-list/admin/autil.php
   >  ————————————————————————————————————
   > FOUND 1 ERROR AFFECTING 1 LINE ———————————————————————————————————— 401 | ERROR
   > | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0;
   > Use mysqli instead ————————————————————————————————————
   > FILE: /data/phpcs/staff-list/admin/dba.php
   >  ————————————————————————————————————
   > FOUND 2 ERRORS AFFECTING 2 LINES ———————————————————————————————————— 78 | 
   > ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP
   > 7.0; Use mysqli instead 280 | ERROR | Extension ‘mysql_’ is deprecated since
   > PHP 5.5 and removed since PHP 7.0; Use mysqli instead`
 * Should they be fixed?

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

 *  Plugin Author [abcfolio](https://wordpress.org/support/users/abcfolio/)
 * (@abcfolio)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-comaptibility-error/#post-14989439)
 * Thanks for getting in touch. The plugin is fully compatible with PHP 7 and above.
   
   The reason that you are seeing these errors from the compatibility checker is
   that the plugin is also backwards compatible with previous PHP versions.
 * 1. The function mysql_… is located inside conditional if else statement and doing
   exactly what is supposed to – runs only if the PHP version is lower than 5.5.
   Otherwise it will use mysqli_…
 * 2. It’s probably not used anyways since it’s executed only if SQL VERSION() check
   fails.
 * 3. This an example of belt and suspenders coding practice when dealing with different
   version of WordPress and PHP.
 * 4. The compatibility checker needs to be improved or person that runs it should
   look at the actual code to avoid reporting false positives.
 *  Thread Starter [Lea](https://wordpress.org/support/users/leac/)
 * (@leac)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-comaptibility-error/#post-14991692)
 * Thank you very much for the detailed answer!
 * Point taken.

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

The topic ‘PHP comaptibility error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/staff-list_0d336f.svg)
 * [Staff List](https://wordpress.org/plugins/staff-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/staff-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/staff-list/)
 * [Active Topics](https://wordpress.org/support/plugin/staff-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/staff-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/staff-list/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Lea](https://wordpress.org/support/users/leac/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/php-comaptibility-error/#post-14991692)
 * Status: resolved