$num1 = 42; $num2 = 7; $result = add($num1, $num2); echo "Result: " . $result; ?>`; if (inputTextarea.value.trim() === "") inputTextarea.value = example; updateStats(inputTextarea, inputStatsSpan); })(); </script> </body> </html>
.option-group label display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; background: #111827; padding: 0.3rem 0.9rem; border-radius: 2rem; cursor: pointer;
// Step 2: Rename user defined functions (function name ...) but not built-in if (optFuncRename.checked) // match function declarations: function funcName( ... ) const funcRegex = /function\s+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*\(/g; let funcMatch; let funcs = new Set(); while ((funcMatch = funcRegex.exec(obfuscated)) !== null) let fname = funcMatch[1]; // skip magic methods & common internal maybe, but keep user rename if (['__construct', '__destruct', '__call', '__get', '__set', '__isset', '__unset', '__sleep', '__wakeup', '__toString', '__invoke', '__clone'].includes(fname)) continue; funcs.add(fname); for (let f of funcs) if (!funcMap.has(f)) funcMap.set(f, randName('_f')); for (let [orig, rand] of funcMap.entries()) const regexFuncDec = new RegExp(`function\\s+$orig\\s*\\(`, 'g'); obfuscated = obfuscated.replace(regexFuncDec, `function $rand(`); // also replace function calls: but careful not to replace inside strings, we do a global call pattern: foo( ... ) const callRegex = new RegExp(`\\b$orig\\s*\\(`, 'g'); obfuscated = obfuscated.replace(callRegex, `$rand(`);
textarea width: 100%; background: #010409; border: 1px solid #2d3a5e; border-radius: 1rem; padding: 1rem; font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace; font-size: 0.85rem; line-height: 1.5; color: #e2e8f0; resize: vertical; outline: none; transition: 0.2s;
.action-bar display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0 1rem; justify-content: center;
// Clear all clearBtn.addEventListener('click', () => inputTextarea.value = ''; outputTextarea.value = ''; errorDiv.style.display = 'none'; updateStats(inputTextarea, inputStatsSpan); updateStats(outputTextarea, outputStatsSpan); );
// Copy result copyBtn.addEventListener('click', async () => const code = outputTextarea.value; if (!code.trim()) showError('Nothing to copy โ obfuscate something first.'); return; try await navigator.clipboard.writeText(code); const originalText = copyBtn.innerHTML; copyBtn.innerHTML = 'โ Copied!'; setTimeout(() => copyBtn.innerHTML = originalText; , 1500); catch (err) showError('Clipboard error: manual copy'); );
inputTextarea.addEventListener('input', () => updateStats(inputTextarea, inputStatsSpan)); outputTextarea.addEventListener('input', () => updateStats(outputTextarea, outputStatsSpan)); // not editable but keep