Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php // Hm kim tra xem chui c cha t "monkey" bn trong cc du ngoc () {} [] khng function..

Decoded Output download

<?php 
// Hm kim tra xem chui c cha t "monkey" bn trong cc du ngoc () {} [] khng 
function contains_monkey($str) { 
    $patterns = [ 
        '/\((.*?)\)/', // Tm chui bn trong du ngoc trn () 
        '/\{(.*?)\}/', // Tm chui bn trong du ngoc nhn {} 
        '/\[(.*?)\]/'  // Tm chui bn trong du ngoc vung [] 
    ]; 
 
    foreach ($patterns as $pattern) { 
        if (preg_match($pattern, $str, $matches)) { 
            if (stripos($matches[1], 'monkey') !== false) { 
                return true; 
            } 
        } 
    } 
 
    return false; 
} 
 
// Hm chuyn i vn bn thnh HTML v loi b cc dng cha "monkey" 
function text_to_html($text) { 
    $lines = explode("
", $text); 
    $html_lines = []; 
 
    foreach ($lines as $line) { 
        if (!contains_monkey($line)) { 
            $html_lines[] = '<p>' . htmlspecialchars($line) . '</p>'; 
        } 
    } 
 
    return implode("
", $html_lines); 
} 
 
// Vn bn u vo 
$text = "ng ch, trng g c bn th no? Mt b lo cm mt ci r nhn thy trng g trong gi ca c so vi nhng ngi khc to hn, rt l thch, nhn khng c lin bc n hi.
 
[Truyn c ng ti duy nht ti MonkeyD.vn - https://monkeyd.vn/ta-xuyen-ve-qua-khu-mang-theo-khong-gian-ki-dieu-ben-nguoi/chuong-166.html.]
 
Khe h m Ha M Lam vn ra c hi rng, nhng ngi lc ny khng ch  n bn ny cng si ni hng mt nhn c ht ngi ny n ngi khc.
 
Khi bn h nhn thy nhng mn  trong gi ca Ha M Lam, tt c u sng st, nhng ngay sau   c ngi phn ng li v bc n trc mt Ha M Lam."; 
 
// Gi hm  chuyn i vn bn thnh HTML 
$html = text_to_html($text); 
 
// Hin th kt qu 
echo $html; 
?>

Did this file decode correctly?

Original Code

<?php
// Hm kim tra xem chui c cha t "monkey" bn trong cc du ngoc () {} [] khng
function contains_monkey($str) {
    $patterns = [
        '/\((.*?)\)/', // Tm chui bn trong du ngoc trn ()
        '/\{(.*?)\}/', // Tm chui bn trong du ngoc nhn {}
        '/\[(.*?)\]/'  // Tm chui bn trong du ngoc vung []
    ];

    foreach ($patterns as $pattern) {
        if (preg_match($pattern, $str, $matches)) {
            if (stripos($matches[1], 'monkey') !== false) {
                return true;
            }
        }
    }

    return false;
}

// Hm chuyn i vn bn thnh HTML v loi b cc dng cha "monkey"
function text_to_html($text) {
    $lines = explode("\n", $text);
    $html_lines = [];

    foreach ($lines as $line) {
        if (!contains_monkey($line)) {
            $html_lines[] = '<p>' . htmlspecialchars($line) . '</p>';
        }
    }

    return implode("\n", $html_lines);
}

// Vn bn u vo
$text = "ng ch, trng g c bn th no? Mt b lo cm mt ci r nhn thy trng g trong gi ca c so vi nhng ngi khc to hn, rt l thch, nhn khng c lin bc n hi.\n
[Truyn c ng ti duy nht ti MonkeyD.vn - https://monkeyd.vn/ta-xuyen-ve-qua-khu-mang-theo-khong-gian-ki-dieu-ben-nguoi/chuong-166.html.]\n
Khe h m Ha M Lam vn ra c hi rng, nhng ngi lc ny khng ch  n bn ny cng si ni hng mt nhn c ht ngi ny n ngi khc.\n
Khi bn h nhn thy nhng mn  trong gi ca Ha M Lam, tt c u sng st, nhng ngay sau   c ngi phn ng li v bc n trc mt Ha M Lam.";

// Gi hm  chuyn i vn bn thnh HTML
$html = text_to_html($text);

// Hin th kt qu
echo $html;
?>

Function Calls

None

Variables

None

Stats

MD5 667b211075aa528056264b005338622d
Eval Count 0
Decode Time 46 ms