Title: PHP 7 compatibility
Last modified: November 5, 2017

---

# PHP 7 compatibility

 *  Resolved [ArtGoddess](https://wordpress.org/support/users/artgoddess/)
 * (@artgoddess)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-7-compatibility-205/)
 * Hello,
 * I was planning to update my server to PHP 7, and after a check, I have seen these
   alerts:
 * FILE: /home/user/public_html/domain.com/wp-content/plugins/the-seo-framework-
   extension-manager/inc/classes/schemapacker.class.php
    —————————————————————————————
   FOUND 2 ERRORS AFFECTING 2 LINES ————————————————————————————— 181 | ERROR | 
   Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0 196
   | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in 
   PHP 7.0 —————————————————————————————
 * Maybe you would like to check on your side. Many thanks for your plugin! 🙂

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

 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-7-compatibility-205/#post-9653332)
 * Hi [@artgoddess](https://wordpress.org/support/users/artgoddess/),
 * The tool you’ve used is just making assumptions meant for debugging, I presume?
   
   It’s a nice find, but in practice, the variables used will never yield negative
   numbers.
 * To clarify, these are the found lines:
 *     ```
       // 181:
       return $this->it >> ( ( $this->level - 1 ) * $this->bits );
   
       // 196:
       return ( $this->it >> ( ( $l - 1 ) * $this->bits ) ) & ( pow( 2, $this->bits ) - 1 );
       ```
   
 * `$l` and `$this->level` are always starting from 1 and counting up.
    The `&` 
   operator on line 196 makes it even more impossible, as that’s always positive…
   unless someone hardcodes input values higher than your system’s architecture (
   32 or 64). Various fail-safes are in place, too.
 * In any case, the tool should also throw an error for `formgenerator.class.php`
   on lines 747, 763 and 779 because there are also negative values present with
   shifts.
 * At the end of the day, those tools are meant for debugging: for if there’s a 
   bug.
 * To rectify: TSFEM supports from PHP “5.5.21/5.6.5” up to PHP 7.2.x.
 *  Thread Starter [ArtGoddess](https://wordpress.org/support/users/artgoddess/)
 * (@artgoddess)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-7-compatibility-205/#post-9653344)
 * Nice to know, and thank you for the explanation.
 * Just in case it helps, this is the plugin that I have used: [https://es.wordpress.org/plugins/php-compatibility-checker/](https://es.wordpress.org/plugins/php-compatibility-checker/)
 * As always, thank your very much for your prompt response. 🙂

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

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

 * ![](https://ps.w.org/autodescription/assets/icon.svg?rev=3000376)
 * [The SEO Framework – Fast, Automated, Effortless.](https://wordpress.org/plugins/autodescription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autodescription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autodescription/)
 * [Active Topics](https://wordpress.org/support/plugin/autodescription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autodescription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autodescription/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [ArtGoddess](https://wordpress.org/support/users/artgoddess/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/php-7-compatibility-205/#post-9653344)
 * Status: resolved