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 FETCH_DIM_R: 003 --INI-- opcache.enable=1 opcache.enable_cli=1 opcache.file_u..

Decoded Output download

--TEST--
JIT FETCH_DIM_R: 003
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
--FILE--
<?php
function foo() {
    $a = "ABCDEF";
    var_dump($a[0]);
    var_dump($a[2]);
    var_dump($a[1.0]);
    var_dump($a["0"]);
    var_dump($a["2"]);
    var_dump($a[false]);
    var_dump($a[true]);
    var_dump($a[null]);
    try {
        var_dump($a["ab"]);
    } catch (\TypeError $e) {
        echo $e->getMessage() . \PHP_EOL;
    }
    $x = "a";
    $y = "b";
    try {
        var_dump($a[$x . $y]);
    } catch (\TypeError $e) {
        echo $e->getMessage() . \PHP_EOL;
    }
    var_dump($a["2x"]);
    $x = "2";
    $y = "x";
    var_dump($a[$x . $y]);
}
foo();
?>
--EXPECTF--
string(1) "A"
string(1) "C"

Warning: String offset cast occurred in %s on line %d
string(1) "B"
string(1) "A"
string(1) "C"

Warning: String offset cast occurred in %s on line %d
string(1) "A"

Warning: String offset cast occurred in %s on line %d
string(1) "B"

Warning: String offset cast occurred in %s on line %d
string(1) "A"
Cannot access offset of type string on string
Cannot access offset of type string on string

Warning: Illegal string offset "2x" in %sfetch_dim_r_003.php on line 24
string(1) "C"

Warning: Illegal string offset "2x" in %sfetch_dim_r_003.php on line 27
string(1) "C"

Did this file decode correctly?

Original Code

--TEST--
JIT FETCH_DIM_R: 003
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
--FILE--
<?php
function foo() {
    $a = "ABCDEF";
    var_dump($a[0]);
    var_dump($a[2]);
    var_dump($a[1.0]);
    var_dump($a["0"]);
    var_dump($a["2"]);
    var_dump($a[false]);
    var_dump($a[true]);
    var_dump($a[null]);
    try {
        var_dump($a["ab"]);
    } catch (\TypeError $e) {
        echo $e->getMessage() . \PHP_EOL;
    }
    $x = "a";
    $y = "b";
    try {
        var_dump($a[$x . $y]);
    } catch (\TypeError $e) {
        echo $e->getMessage() . \PHP_EOL;
    }
    var_dump($a["2x"]);
    $x = "2";
    $y = "x";
    var_dump($a[$x . $y]);
}
foo();
?>
--EXPECTF--
string(1) "A"
string(1) "C"

Warning: String offset cast occurred in %s on line %d
string(1) "B"
string(1) "A"
string(1) "C"

Warning: String offset cast occurred in %s on line %d
string(1) "A"

Warning: String offset cast occurred in %s on line %d
string(1) "B"

Warning: String offset cast occurred in %s on line %d
string(1) "A"
Cannot access offset of type string on string
Cannot access offset of type string on string

Warning: Illegal string offset "2x" in %sfetch_dim_r_003.php on line 24
string(1) "C"

Warning: Illegal string offset "2x" in %sfetch_dim_r_003.php on line 27
string(1) "C"

Function Calls

foo 1
var_dump 1

Variables

$a ABCDEF

Stats

MD5 76b192110bc6ae720c4ab5d6497e3d2c
Eval Count 0
Decode Time 106 ms