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

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- JIT Shift Right: 003 --INI-- opcache.enable=1 opcache.enable_cli=1 opcache.file_u..

Decoded Output download

--TEST--
JIT Shift Right: 003
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
opcache.protect_memory=1
--EXTENSIONS--
opcache
--FILE--
<?php
function encodeDynamicInteger(int $int): string {
    $out = "";
    for ($i = 0; ($int >> $i) > 0x80; $i += 7) {
        $out .= \chr(0x80 | (($int >> $i) & 0x7f));
    }
    return $out . \chr($int >> $i);
}
$s = encodeDynamicInteger(235);
var_dump(strlen($s), ord($s[0]), ord($s[1]));
?>
--EXPECT--
int(2)
int(235)
int(1)

Did this file decode correctly?

Original Code

--TEST--
JIT Shift Right: 003
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
opcache.protect_memory=1
--EXTENSIONS--
opcache
--FILE--
<?php
function encodeDynamicInteger(int $int): string {
    $out = "";
    for ($i = 0; ($int >> $i) > 0x80; $i += 7) {
        $out .= \chr(0x80 | (($int >> $i) & 0x7f));
    }
    return $out . \chr($int >> $i);
}
$s = encodeDynamicInteger(235);
var_dump(strlen($s), ord($s[0]), ord($s[1]));
?>
--EXPECT--
int(2)
int(235)
int(1)

Function Calls

None

Variables

None

Stats

MD5 ba56c9825d1885e86255c59ee7ed57c7
Eval Count 0
Decode Time 102 ms