Back to Blog Posts


By David / August 9th, 2022


We are excited to announce that WHMCS with PHP 8.1 is right around the corner! Ioncube has started to publish v12 of their Loader and Encoder products. Our developers are testing these, reporting issues, and tweaking WHMCS for a v8.6.0 beta release. We anticipate publishing v8.6.0 beta in the next 2-3 weeks.

Ioncube Loader v12
It is important to remember that Ioncube Loader v12 is only compatible with PHP 8.1 and later environments (which is detailed in their initial June 29th blog post). The previous Loader, v11, only supports up to PHP 7.4. This means that WHMCS will not run in PHP 8.0 environments. Fortunately, WHMCS v8.6.0 will operate in PHP 7.2, 7.3, 7.4, or 8.1 environments with the correct loader, so it will be possible for you to update your environment anytime after updating to WHMCS v8.6 without application downtime.
PHP Compatibility
WHMCS v8.6.0 adds support for the PHP 8.1 environment while retaining support for the PHP 7.2, 7.3, and 7.4 environments. In order to accomplish this, we had to craft many small, but critical, patches for dependencies. In many cases, moving to a full update of a dependency would have resulted in backwards breaking change either at the language level or at the implementation level (or both). We strongly believe that these micro patches are the best strategy for our community. They reduce the volume of core application change, provide the broadest viable environment support, and give 3rd-party developers the most flexibility to meet their own compatibility goals. The difference between PHP 7 and PHP 8 can be significant which is why we are striving to make this transition as smooth as possible for the entire WHMCS community.
Compatibility in Future Releases
We expect v8.6 to be the last version of WHMCS to support PHP 7, and that the next non-maintenance release will require a minimum of PHP 8.1. We anticipate many dependencies will be updated when that change occurs. This is important to note for 3rd-party developers who utilize these libraries because it may introduce backwards breaking change; as always, notifications will be provided in the Release Notes.
PHP 8 and Custom Code
As noted earlier, we've made every effort to ensure your customizations work without need for functional change. That said, when you are testing your code in PHP 8 there may be a few gotchas. We strongly recommend reading the 8.0 and 8.1 migrations guides for the comprehensive list of concerns, but below are two we found worth noting:
  • Return Type Compatibility with Internal Classes
    Most non-final internal methods now require overriding methods to declare a compatible return type, otherwise a deprecation message is emitted.
  • Comparison of string to number
    Non-strict comparisons between numbers and non-numeric strings (==, >, <, etc) now work by casting the number to string and comparing the strings. For example, 0 == '' and 0 > '' now evaluate to FALSE.
The next release, WHMCS v8.6, will support PHP versions 7.2 thru 8.1 (with the exception of 8.0) and we anticipate it being released in the next 2-3 weeks.

We'll be blogging again soon with our publication announcement for 8.6.0-beta.1 so stay tuned for more!

Liked this article? Share it