PHP 7 vs PHP 8 ionCube Files: What Changed?
Comparison of ionCube encoding for PHP 7 vs PHP 8. What features changed, compatibility considerations, and migration guidance.
The jump from PHP 7 to PHP 8 brought major language changes that affect ionCube encoding. This comparison helps you understand the differences.
Key PHP 8 Features That Affect ionCube Files
Named Arguments
PHP 8.0 introduced named arguments: array_slice(array: $arr, length: 5).
Match Expression
The match() expression replaces many switch statements with a cleaner syntax.
Constructor Property Promotion
PHP 8.0 combines property declaration and constructor initialization.
Union Types
PHP 8.0 allows int|float type declarations.
Enums (PHP 8.1)
Native enumerations with backed values.
Readonly Properties (PHP 8.1)
Immutable class properties.
Readonly Classes (PHP 8.2)
Entire classes can be immutable.
ionCube Version Mapping
| PHP Version | Minimum ionCube | Recommended ionCube |
|---|---|---|
| PHP 7.4 | v11 | v13–v14 |
| PHP 8.0 | v13 | v14–v15 |
| PHP 8.1 | v14 | v15 |
| PHP 8.2 | v15 | v15 |
| PHP 8.3 | v15 | v15 |
| PHP 8.4 | v15 | v15 |
Compatibility Between PHP Versions
Can PHP 8 run PHP 7 ionCube files?
Sometimes. If the encoded code uses PHP 7.x-only features (like each(), create_function()), it may fail on PHP 8. But if the code is compatible, PHP 8 can often run PHP 7 ionCube files.
Can PHP 7 run PHP 8 ionCube files?
No. PHP 8 features (enums, match, named args) don't exist in PHP 7. The files will fail to execute.
Decoding PHP 7 vs PHP 8 Files
Our decoder handles both:
PHP 7 Files
- Encoded with v10–v14
- Simpler encoding, high decode accuracy
- May use deprecated PHP features
PHP 8 Files
- Encoded with v14–v15
- Modern PHP features preserved in output
- Higher protection levels
Migration Guide: PHP 7 to PHP 8
Step 1: Decode All Files
Decode your ionCube files using our decoder.
Step 2: Test on PHP 7
Verify decoded files work correctly on your current PHP version.
Step 3: Upgrade to PHP 8
# Check for deprecated features
php -d error_reporting=E_ALL decoded.php
# Fix deprecation warnings
# Common issues: each(), create_function(), money_format()
Step 4: Deploy on PHP 8
Standard deployment — no ionCube Loader needed.
Should You Encode for PHP 7 or PHP 8?
If you're encoding new files:
Encode for PHP 8.1+
- Widest compatibility with modern servers
- All features supported
- Best long-term investment
Encode for PHP 7.4 only if:
- Your customers are on legacy hosting
- You need maximum compatibility
- You accept that PHP 7.4 is end-of-life
Conclusion
PHP 8 brought significant language changes that affect ionCube encoding. For new projects, encode for PHP 8.1+. For legacy files, decode and migrate to modern PHP.
Decode your PHP 7 or PHP 8 ionCube files — all versions supported.
Update: SourceGuardian support is now included
PHPDecompile now supports both ionCube and SourceGuardian protected PHP files. If your project contains a mix of protected vendor files, abandoned modules, or legacy PHP packages, you can use the same upload, trial preview, progress tracking, and download workflow for both supported encoders.
Related Articles
How to Recover Source From an ionCube WordPress Plugin You Own
Learn how owners can recover readable PHP source from an ionCube-protected WordPress plugin they own, plus what to prepare before you start a recovery.
Recovering ionCube WooCommerce Extension Source Code
A practical guide for store owners recovering readable source from an ionCube-protected WooCommerce extension they own, so they can maintain and audit it safely.
ionCube WHMCS Module Source Recovery for Owners
How hosting and billing operators can recover readable source from an ionCube-protected WHMCS module they own, to keep automation and provisioning maintainable.
Decoder Guides
Ready to decode ionCube and SourceGuardian files?
Try PHPDecompile free. No credit card required.