h1 font-size: 2.2rem; font-weight: 700; background: linear-gradient(135deg, #c084fc, #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0 0 0.35rem 0; letter-spacing: -0.3px;
// ------------------- CORE OBFUSCATION ENGINE ------------------ // This is a lightweight but powerful obfuscator that respects PHP syntax. // It handles variables, functions, strings, numbers, whitespace. // Note: not a full AST parser but regex + smart token simulation.
let obfuscated = code; // --- STRIP COMMENTS & WHITESPACE (if option enabled) --- if (optStripSpace.checked) (?<![\'"])#.*/g, ''); // remove extra whitespace (multiple spaces, newlines) but keep php tags structure obfuscated = obfuscated.replace(/\s+/g, ' ').replace(/<\?php /g, "<?php ").replace(/ \?>/g, " ?>"); // also fix semicolon spacing obfuscated = obfuscated.replace(/; /g, ';'); php obfuscator online
button.primary:hover background: linear-gradient(95deg, #3b82f6, #6366f1); transform: translateY(-1px);
<div class="two-columns"> <!-- INPUT PANEL --> <div class="panel"> <div class="panel-header"> <h2>📄 Original PHP Code</h2> <span class="badge">paste your script</span> </div> <textarea id="inputCode" rows="14" placeholder="<?php // Example PHP code $message = 'Hello World'; function greet($name) return 'Welcome ' . $name; echo greet($message); ?>"></textarea> <div class="stats"> <span id="inputStats">Lines: 0 | Size: 0 B</span> <span>✨ Obfuscation level: Medium/High</span> </div> </div> h1 font-size: 2
.option-group display: flex; gap: 1rem; flex-wrap: wrap;
footer text-align: center; margin-top: 2rem; font-size: 0.7rem; color: #4b556b; let obfuscated = code; // --- STRIP COMMENTS
// Step 4: Numeric literal obfuscation: 42 -> (0x2A) or (24+18) etc if (optNumObf.checked) // Replace integer numbers (not inside strings or already obfuscated) obfuscated = obfuscated.replace(/\b(\d+)\b/g, (match, num) => );
$num1 = 42; $num2 = 7; $result = add($num1, $num2); echo "Result: " . $result; ?>`; if (inputTextarea.value.trim() === "") inputTextarea.value = example; updateStats(inputTextarea, inputStatsSpan); })(); </script> </body> </html>