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 /** * Created by Cristian. * Date: 05/09/16 11:27 PM. */ namespace Reliese\Supp..
Decoded Output download
<?php
/**
* Created by Cristian.
* Date: 05/09/16 11:27 PM.
*/
namespace Reliese\Support;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
class Classify
{
/**
* @param string $name
* @param string $value
*
* @return string
*/
public function annotation($name, $value)
{
return "
* @$name $value";
}
/**
* Constant template.
*
* @param string $name
* @param mixed $value
*
* @return string
*/
public function constant($name, $value)
{
$value = Dumper::export($value);
return " const $name = $value;
";
}
/**
* Field template.
*
* @param string $name
* @param mixed $value
* @param array $options
*
* @return string
*/
public function field($name, $value, $options = [])
{
$value = Dumper::export($value);
$before = Arr::get($options, 'before', '');
$visibility = Arr::get($options, 'visibility', 'protected');
$after = Arr::get($options, 'after', "
");
return "$before $visibility \$$name = $value;$after";
}
/**
* @param string $name
* @param string $body
* @param array $options
*
* @return string
*/
public function method($name, $body, $options = [])
{
$visibility = Arr::get($options, 'visibility', 'public');
$returnType = Arr::get($options, 'returnType', null);
$formattedReturnType = $returnType ? ': '.$returnType : '';
return "
$visibility function $name()$formattedReturnType
{
$body
}
";
}
public function mixin($class)
{
if (Str::startsWith($class, '\')) {
$class = Str::replaceFirst('\', '', $class);
}
return " use \$class;
";
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* Created by Cristian.
* Date: 05/09/16 11:27 PM.
*/
namespace Reliese\Support;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
class Classify
{
/**
* @param string $name
* @param string $value
*
* @return string
*/
public function annotation($name, $value)
{
return "\n * @$name $value";
}
/**
* Constant template.
*
* @param string $name
* @param mixed $value
*
* @return string
*/
public function constant($name, $value)
{
$value = Dumper::export($value);
return "\tconst $name = $value;\n";
}
/**
* Field template.
*
* @param string $name
* @param mixed $value
* @param array $options
*
* @return string
*/
public function field($name, $value, $options = [])
{
$value = Dumper::export($value);
$before = Arr::get($options, 'before', '');
$visibility = Arr::get($options, 'visibility', 'protected');
$after = Arr::get($options, 'after', "\n");
return "$before\t$visibility \$$name = $value;$after";
}
/**
* @param string $name
* @param string $body
* @param array $options
*
* @return string
*/
public function method($name, $body, $options = [])
{
$visibility = Arr::get($options, 'visibility', 'public');
$returnType = Arr::get($options, 'returnType', null);
$formattedReturnType = $returnType ? ': '.$returnType : '';
return "\n\t$visibility function $name()$formattedReturnType\n\t{\n\t\t$body\n\t}\n";
}
public function mixin($class)
{
if (Str::startsWith($class, '\\')) {
$class = Str::replaceFirst('\\', '', $class);
}
return "\tuse \\$class;\n";
}
}
Function Calls
None |
Stats
MD5 | 3df1e3f145a468daf4d816e9c44c0392 |
Eval Count | 0 |
Decode Time | 76 ms |