Skip to content

st2erw2od/php-code-obfuscator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP code obfuscator

A simple and easy to use PHP code obfuscator that doesn't shouldn't break your project's code. Deploy your projects without being afraid of unwanted copies or changes by 3rd party developers without your consent.


How it works

  • The class copies all the files from the source_dir to your destination_dir and obfuscates the code.
require_once 'Obfuscator.php';
$obfuscator = new Obfuscator();
$obfuscator->run();

What does it obfuscate

  • variables incl. arrays
  • session-variables
  • interfaces
  • constants
  • whitespace
  • comments

What doesn't it obfuscate

  • file names (no file rename because of external calls like form submit or ajax)
  • class names (because of file names and autoload)
  • $_GET, $_POST, $_REQUEST (because of webservice calls)
  • $_COOKIES (because of external influences like js)
  • magic methods (because the code would break)
  • array index/key (might be used from json decode)

Dependecies

  • PHP 5.x
  • filesystem permission (read/write)

Todos

  • replace $GLOBAL
  • replace exceptions
  • source and destination path settings from the outside
  • setting if strip whitespaces (yes/no)
  • add custom file heading text
  • tests with different platforms (Windows, Mac, Linux)

Changes

You are free to contribute to this project.

⭐ if you like this project

About

PHP Code Obfuscator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages