PHP code example of kudashevs / html-obfuscator

1. Go to this page and download the library: Download kudashevs/html-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/ */

    

kudashevs / html-obfuscator example snippets


use Kudashevs\HtmlObfuscator\Obfuscator;

$text = 'the answer for 3 + 2 is';

// static invocation
$obfuscated = Obfuscator::obfuscate($text);

// dynamic invocation
$obfuscator = new Obfuscator();
$obfuscated = $obfuscator->obfuscate($text);

print_r($obfuscated);
// both cases will result into
t&#x0068;&#X65;&#0032;&#x61;&#x6e;&#115;w&#0101;&#X72;&#x0020;fo&#x0072;&#x0020;&#0051; +&#x20;2&#x0020;i&#x0073;