PHP code example of globus-studio / php-obfuscator
1. Go to this page and download the library: Download globus-studio/php-obfuscator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
globus-studio / php-obfuscator example snippets
LOBUSstudio\PhpObfuscator\Obfuscator;
use GLOBUSstudio\PhpObfuscator\Options;
$obfuscator = new Obfuscator();
echo $obfuscator->obfuscate(<<<'PHP'
function greet(string $name): string {
return "Hello, $name";
}
echo greet('Ada');
PHP);
use GLOBUSstudio\PhpObfuscator\Obfuscator;
use GLOBUSstudio\PhpObfuscator\Options;
// Public API stays callable from the outside while the internals are scrambled.
$opts = new Options(
obfuscateClasses: false,
obfuscateMethods: false,
obfuscateFunctions: false,
);
echo (new Obfuscator($opts))->obfuscate(file_get_contents('Library.php'));