Php Obfuscator Online Link
button i font-style: normal; font-weight: bold;
// Options checkboxes const optVarRename = document.getElementById('optVarRename'); const optFuncRename = document.getElementById('optFuncRename'); const optStringEncode = document.getElementById('optStringEncode'); const optStripSpace = document.getElementById('optStripSpace'); const optNumObf = document.getElementById('optNumObf'); php obfuscator online
<div class="action-bar"> <button id="obfuscateBtn" class="primary">🌀 Obfuscate Now</button> <button id="copyBtn" class="secondary">📋 Copy Result</button> <button id="clearBtn" class="warning">🗑 Clear All</button> </div> button i font-style: normal; font-weight: bold; // Options
.action-bar display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0 1rem; justify-content: center; we skip $this and $GLOBALS if (['this', 'GLOBALS',
// Step 1: Extract variable names ($var) inside code (excluding those inside strings and comments already stripped partially) // We'll do a simple regex that finds $[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* but avoid special cases like ${} // We'll apply variable renaming only for user variables. if (optVarRename.checked) const varRegex = /\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\b/g; let match; // collect all variables const candidates = new Set(); while ((match = varRegex.exec(obfuscated)) !== null) let varName = match[1]; // skip superglobals and common reserved? keep _GET, _POST, etc but user can rename them optionally risky? we skip $this and $GLOBALS if (['this', 'GLOBALS', '_SERVER', '_GET', '_POST', '_REQUEST', '_SESSION', '_COOKIE', '_FILES', '_ENV'].includes(varName)) continue; if (varName.startsWith('_')) continue; // keep some internal? candidates.add(varName); // assign random names for (let v of candidates) if (!varMap.has(v)) varMap.set(v, randName('_v')); // replace variables in code (with word boundaries) for (let [orig, rand] of varMap.entries()) const regex = new RegExp(`\\$$orig\\b`, 'g'); obfuscated = obfuscated.replace(regex, `$$rand`);