Download the PHP package escarter/laravel-obfuscator without Composer

On this page you can find all versions of the php package escarter/laravel-obfuscator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-obfuscator

Laravel Obfuscator

A powerful Laravel package for code obfuscation with encryption and variable name randomization. Protect your PHP source code with 9.5/10 security level (ionCube equivalent).

Features

Installation

Via Composer (Recommended)

Note: This package is now available as a stable v1.0.0 release on Packagist!

Manual Installation (Local Package)

  1. Create a packages directory in your Laravel project root:

  2. Clone or copy this package to packages/escarter/laravel-obfuscator

  3. Add to your composer.json:

  4. Run:

Configuration

Publish the configuration file:

This creates config/obfuscator.php where you can customize:

Configuration Example

Usage

Basic Obfuscation

This will:

  1. โœ… Create a timestamped backup
  2. ๐Ÿ”’ Encrypt all PHP files in configured paths
  3. ๐Ÿงน Clean Blade view comments
  4. ๐Ÿ“Š Display statistics and encryption key

Dry Run Mode

Preview what will be obfuscated without making changes:

Skip Backup

If you've already created a backup manually:

Skip Blade View Cleaning

Obfuscate only PHP files, leave Blade views untouched:

Skip Debug Disabling

Disable debug prevention features (not recommended for production):

How It Works

1. Code Parsing

The package uses nikic/php-parser to parse PHP files into Abstract Syntax Trees (AST).

2. Obfuscation

3. Encryption

Code is encrypted using XOR cipher with a random key and base64 encoded.

4. Wrapper Generation

Encrypted code is wrapped in a self-executing eval() statement:

Debug Disabling Features

The package includes advanced debug disabling features to prevent reverse engineering:

Error Reporting Disabled

Debug Function Overrides

XDebug Protection

Anti-Debug Detection

Configuration Options

Protected Elements

The package automatically preserves:

Variables

Methods

Properties

Security Level

Protection: 9.5/10 (ionCube equivalent)

โœ… What's Protected:

โš ๏ธ Limitations:

Best Practices

Before Obfuscation

  1. Test Your Application - Ensure everything works before obfuscating
  2. Create Manual Backup - While auto-backup is included, create your own
  3. Review Configuration - Check excluded files and protected names
  4. Version Control - Commit unobfuscated code to a private repository

After Obfuscation

  1. Save Encryption Key - Store it securely for debugging purposes
  2. Test Thoroughly - Verify all functionality works after obfuscation
  3. Monitor Performance - eval() adds minimal overhead but test critical paths
  4. Document Backup Location - Keep backup path for rollback if needed

Production Deployment

Troubleshooting

Application Not Working After Obfuscation

  1. Check for excluded files - some files may need to be added to exclusions
  2. Review protected method names - add custom methods to config
  3. Restore from backup and try again with adjusted configuration

Restore from Backup

Performance Issues

The obfuscation adds minimal runtime overhead (< 1ms per file). If you experience issues:

  1. Use PHP opcache to cache eval'd code
  2. Ensure debug mode is disabled in production
  3. Consider excluding frequently-loaded files

Requirements

Development

Running Tests

Code Style

License

MIT License. See LICENSE for details.

Author

Escarter
Email: [email protected]

Support

For issues, questions, or contributions:

Disclaimer

โš ๏ธ Important: This package modifies your source code. While it creates backups automatically:

The authors are not responsible for any data loss or application failures resulting from the use of this package.

Changelog

Version 1.0.0


Made with โค๏ธ by Escarter


All versions of laravel-obfuscator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1|^8.2|^8.3
illuminate/support Version ^9.0|^10.0|^11.0
nikic/php-parser Version ^4.0|^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package escarter/laravel-obfuscator contains the following files

Loading the files please wait ...