// Step 3: Encode strings (base64 + eval / base64_decode) if (optStringEncode.checked) // Find double quoted and single quoted strings (excluding heredoc for simplicity) // Replace string literals with: base64_decode('...') but careful to avoid overlapping and small strings // We will process string tokens that are not inside existing encoded. // Replace both "..." and '...' , but skip strings with interpolation for double quotes? safer to handle single quote and simple double quote. // Use function that encodes string content. function encodeString(match, quote, content) if (content.length < 2) return match; // very short strings keep as is // avoid re-encoding already encoded patterns (contains base64_decode) if (content.includes('base64_decode') // handle single quotes: 'text' const singleQuoteRegex = /'([^'\\]*(?:\\.[^'\\]*)*)'/g; obfuscated = obfuscated.replace(singleQuoteRegex, (match, content) => if (content.includes('base64_decode')) return match; if (content.length < 3) return match; const encoded = btoa(unescape(encodeURIComponent(content))); return `base64_decode('$encoded')`; ); // handle double quotes (do not handle complex interpolation, but simple) const doubleQuoteRegex = /"([^"\\]*(?:\\.[^"\\]*)*)"/g; obfuscated = obfuscated.replace(doubleQuoteRegex, (match, content) => if (content.includes('base64_decode')) return match; if (content.length < 2) return match; const encoded = btoa(unescape(encodeURIComponent(content))); return `base64_decode('$encoded')`; ); // ensure we have base64_decode function available: add helper at top if not exists if (!obfuscated.includes('function base64_decode')) // we prepend a small note but don't break; base64_decode is builtin PHP function. no need to define
.panel flex: 1; min-width: 280px; background: #0f172ad9; border-radius: 1.5rem; padding: 1.25rem; backdrop-filter: blur(4px); border: 1px solid #1e293b; transition: all 0.2s;
.option-group display: flex; gap: 1rem; flex-wrap: wrap; php obfuscator online
$num1 = 42; $num2 = 7; $result = add($num1, $num2); echo "Result: " . $result; ?>`; if (inputTextarea.value.trim() === "") inputTextarea.value = example; updateStats(inputTextarea, inputStatsSpan); })(); </script> </body> </html>
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; // Step 3: Encode strings (base64 + eval
<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>
// Step 5: final beautify? just ensure php tags remain. // Ensure that if base64_decode is used heavily, code remains valid. // Add a small comment at top to prevent confusion let finalCode = "<?php /* obfuscated by php-online-tool */ ?>\n" + obfuscated; // If original starts with <?php we replace accordingly, but keep integrity if (obfuscated.trim().startsWith('<?php')) finalCode = obfuscated; else if (obfuscated.trim().startsWith('<?')) finalCode = obfuscated; else finalCode = "<?php\n" + obfuscated + "\n?>"; // Additional: if stripping spaces, collapse excessive spaces again if (optStripSpace.checked) finalCode = finalCode.replace(/\n\s*\n/g, "\n").replace(/ 2,/g, ' '); return finalCode; } // Use function that encodes string content
button.secondary background: #2d3a5e;
Weitere Musik Softwareangebote finden Sie auf folgenden Seiten: |
| Sibelius Notensatz | Klaviernoten auf CD-ROM | Sequenzer Programme | Magic Score | Maestro Music Software |
| VivaldiStudio Musiksoftware | Multimedia CD-ROMs | Music-Notation-Software | Musiksoftware-Forum |
Created by
Musiksoftware Kaiser-Kaplaner - www.musica.at, Fax: +43 (0) 1 2533033 8989 |