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 if (!($posUserId != WS_ID_NONE)) { goto KXrZl; } switch ($posUserId) { ..

Decoded Output download

<?php 
if (!($posUserId != WS_ID_NONE)) { 
    goto KXrZl; 
} 
switch ($posUserId) { 
    case WS_ID_LAST: 
        $params = $params == "" ? $userId : $params . ", " . $userId; 
        goto fEsw7; 
    case WS_ID_FIRST: 
    case WS_ID_OPT: 
        $params = $params == "" ? $userId : $userId . ", " . $params; 
        goto fEsw7; 
    default: 
        goto fEsw7; 
} 
pDk2C: 
fEsw7: 
KXrZl: 
try { 
    if (!($proc === null)) { 
        goto mi0Bi; 
    } 
    log_to_file( 
        "No stored proc set for op {$op}" 
    ); 
    send_error( 
        "Incomplete definition. Please report it.", 
        $op, 
        WS_ERR_BADDEF 
    ); 
    mi0Bi: 
    $Y6JH9 = $dbinst->procCall2( 
        $proc, 
        $params, 
        $fileparams, 
        $expect_binary, 
        $outparams, 
        ($qVw5q & WS_OPT_UNION) != 0, 
        $pre_stmt, 
        $op_opts 
    ); 
    if (!isset($post_func)) { 
        goto KBdO8; 
    } 
    try { 
        log_to_file( 
            "Running post-op {$op}" 
        ); 
        $post_func($Y6JH9, count($Y6JH9)); 
    } catch (exception $VpcIC) { 
        log_to_file( 
            "Failed post-op {$op}: " . 
                $VpcIC->getMessage() 
        ); 
        if ( 
            !( 
                isset( 
                    $op_opts[ 
                        "fwd_post_op_error" 
                    ] 
                ) && 
                true === 
                    $op_opts[ 
                        "fwd_post_op_error" 
                    ] 
            ) 
        ) { 
            goto WyunV; 
        } 
        send_error($VpcIC->getMessage(), $op, $VpcIC->getCode()); 
        WyunV: 
    } 
    KBdO8: 
    send_result(make_result($Y6JH9)); 
} catch (exception $VpcIC) { 
    if (!available("debug")) { 
        goto JPgEr; 
    } 
    send_error( 
        $VpcIC->getMessage(), 
        $op . "; DEBUG: " . $params, 
        $VpcIC->getCode() 
    ); 
    goto WFVGd; 
    JPgEr: 
    send_error($VpcIC->getMessage(), $op, $VpcIC->getCode()); 
    WFVGd: 
} 
 ?>

Did this file decode correctly?

Original Code

<?php
if (!($posUserId != WS_ID_NONE)) {
    goto KXrZl;
}
switch ($posUserId) {
    case WS_ID_LAST:
        $params = $params == "" ? $userId : $params . "\54\x20" . $userId;
        goto fEsw7;
    case WS_ID_FIRST:
    case WS_ID_OPT:
        $params = $params == "" ? $userId : $userId . "\x2c\x20" . $params;
        goto fEsw7;
    default:
        goto fEsw7;
}
pDk2C:
fEsw7:
KXrZl:
try {
    if (!($proc === null)) {
        goto mi0Bi;
    }
    log_to_file(
        "\116\157\x20\x73\164\x6f\162\x65\x64\40\x70\x72\x6f\143\40\163\145\164\40\146\x6f\162\x20\x6f\x70\x20{$op}"
    );
    send_error(
        "\111\156\x63\x6f\x6d\160\154\145\164\145\40\144\145\x66\151\156\x69\x74\x69\x6f\156\56\40\120\x6c\x65\x61\x73\x65\x20\162\145\160\x6f\x72\x74\40\151\164\x2e",
        $op,
        WS_ERR_BADDEF
    );
    mi0Bi:
    $Y6JH9 = $dbinst->procCall2(
        $proc,
        $params,
        $fileparams,
        $expect_binary,
        $outparams,
        ($qVw5q & WS_OPT_UNION) != 0,
        $pre_stmt,
        $op_opts
    );
    if (!isset($post_func)) {
        goto KBdO8;
    }
    try {
        log_to_file(
            "\x52\165\x6e\x6e\x69\x6e\147\40\160\x6f\x73\x74\55\157\160\x20{$op}"
        );
        $post_func($Y6JH9, count($Y6JH9));
    } catch (exception $VpcIC) {
        log_to_file(
            "\x46\141\151\154\x65\x64\40\160\x6f\163\164\55\x6f\x70\40{$op}\x3a\x20" .
                $VpcIC->getMessage()
        );
        if (
            !(
                isset(
                    $op_opts[
                        "\x66\167\144\137\x70\x6f\163\x74\x5f\157\160\x5f\145\x72\x72\157\162"
                    ]
                ) &&
                true ===
                    $op_opts[
                        "\146\x77\x64\137\160\157\x73\x74\137\157\x70\137\145\x72\x72\157\162"
                    ]
            )
        ) {
            goto WyunV;
        }
        send_error($VpcIC->getMessage(), $op, $VpcIC->getCode());
        WyunV:
    }
    KBdO8:
    send_result(make_result($Y6JH9));
} catch (exception $VpcIC) {
    if (!available("\x64\145\142\x75\147")) {
        goto JPgEr;
    }
    send_error(
        $VpcIC->getMessage(),
        $op . "\73\40\x44\105\102\x55\107\72\x20" . $params,
        $VpcIC->getCode()
    );
    goto WFVGd;
    JPgEr:
    send_error($VpcIC->getMessage(), $op, $VpcIC->getCode());
    WFVGd:
}

Function Calls

None

Variables

None

Stats

MD5 10bdc5349cf5efde35f29a05fec8a9b3
Eval Count 0
Decode Time 47 ms