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 class C_Utility { public static function add_slashes($str) { if..
Decoded Output download
<?php
class C_Utility
{
public static function add_slashes($str)
{
if (get_magic_quotes_gpc() == 1)
{
return $str;
}
else
{
return addslashes($str);
}
}
public static function indent_json($json)
{
$result = '';
$pos = 0;
$strLen = strlen($json);
$indentStr = " ";
$newLine = "\xa";
for ($i = 0; $i <= $strLen; $i++)
{
$char = substr($json, $i, 1);
if ($char == "}" || $char == "]")
{
$result .= $newLine;
$pos--;
for ($j = 0; $j < $pos; $j++)
{
$result .= $indentStr;
}
}
$result .= $char;
if ($char == "{" || $char == "[")
{
$result .= $newLine;
if ($char == "{" || $char == "[")
{
$pos++;
}
for ($j = 0; $j < $pos; $j++)
{
$result .= $indentStr;
}
}
}
return $result;
}
public static function literalBool($boolValue)
{
return $boolValue ? "true" : "false";
}
public static function gen_rowids($arr = array(), $keys = array())
{
$rowids = '';
foreach ($keys as $key => $val)
{
$rowids .= $arr[$val] . PK_DELIMITER;
}
$rowids = substr($rowids, 0, -3);
return $rowids;
}
public static function is_debug()
{
return defined("DEBUG") ? DEBUG : false;
}
} ?>
Did this file decode correctly?
Original Code
<?php
class C_Utility
{
public static function add_slashes($str)
{
if (get_magic_quotes_gpc() == 1)
{
return $str;
}
else
{
return addslashes($str);
}
}
public static function indent_json($json)
{
$result = '';
$pos = 0;
$strLen = strlen($json);
$indentStr = "\x20\40";
$newLine = "\xa";
for ($i = 0; $i <= $strLen; $i++)
{
$char = substr($json, $i, 1);
if ($char == "\175" || $char == "\x5d")
{
$result .= $newLine;
$pos--;
for ($j = 0; $j < $pos; $j++)
{
$result .= $indentStr;
}
}
$result .= $char;
if ($char == "\173" || $char == "\133")
{
$result .= $newLine;
if ($char == "\173" || $char == "\x5b")
{
$pos++;
}
for ($j = 0; $j < $pos; $j++)
{
$result .= $indentStr;
}
}
}
return $result;
}
public static function literalBool($boolValue)
{
return $boolValue ? "\x74\x72\x75\145" : "\x66\141\154\x73\x65";
}
public static function gen_rowids($arr = array(), $keys = array())
{
$rowids = '';
foreach ($keys as $key => $val)
{
$rowids .= $arr[$val] . PK_DELIMITER;
}
$rowids = substr($rowids, 0, -3);
return $rowids;
}
public static function is_debug()
{
return defined("\x44\x45\102\125\107") ? DEBUG : false;
}
} ?>
Function Calls
None |
Stats
MD5 | b2c451db569970467cd7171c60ec2567 |
Eval Count | 0 |
Decode Time | 52 ms |