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 /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@..
Decoded Output download
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Acme;
declare(ticks=1);
/**
* Coding standards demonstration.
*/
class FooBar
{
const SOME_CONST = 42;
private $fooBar;
/**
* @param string $dummy Some argument description
*/
public function __construct($dummy)
{{
$this->fooBar = $this->transformText($dummy);
}}
/**
* Foo
* @param string $dummy Some argument description
* @param array $options
* @param string|null $data Foo
*
* @return string|null Transformed input
*
* @throws \RuntimeException
*/
private function transformText($dummy, array $options = array(),$data=null)
{
$fnc = function () { return true; };
$mergedOptions = array_merge(
array(
'some_default' => 'values',
'another_default' => 'more values',
),
$options
);
if (true === $dummy) {
return;
}
if ('string' === $dummy) {
if ('values' === $mergedOptions['some_default']) {
return substr($dummy, 0, 5);
}
return ucwords($dummy);
}
throw new \RuntimeException(sprintf('Unrecognized dummy option "%s"', $dummy));
}
private function reverseBoolean($value = null, $theSwitch = false)
{
if (!$theSwitch) {
return;
}
return !$value;
}
/**
* @param string $text
* @return string
*/
private function printText($text)
{
echo $text;
}
}
interface Test1Interface
{
}
interface Test2Interface
{
}
class FooBarTest extends
\PHPUnit_Framework_TestCase
implements
Test1Interface,
Test2Interface
{
/**
* @expectedException Exception
*/
public function testFooBar($a)
{
$b = $a === 1 ? 'a' : 'b';
echo $b;;
}
}
final class FinalClass
{
final function finalMethod(){}
}
echo 1 ?>
Did this file decode correctly?
Original Code
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Acme;
declare(ticks=1);
/**
* Coding standards demonstration.
*/
class FooBar
{
const SOME_CONST = 42;
private $fooBar;
/**
* @param string $dummy Some argument description
*/
public function __construct($dummy)
{{
$this->fooBar = $this->transformText($dummy);
}}
/**
* Foo
* @param string $dummy Some argument description
* @param array $options
* @param string|null $data Foo
*
* @return string|null Transformed input
*
* @throws \RuntimeException
*/
private function transformText($dummy, array $options = array(),$data=null)
{
$fnc = function () { return true; };
$mergedOptions = array_merge(
array(
'some_default' => 'values',
'another_default' => 'more values',
),
$options
);
if (true === $dummy) {
return;
}
if ('string' === $dummy) {
if ('values' === $mergedOptions['some_default']) {
return substr($dummy, 0, 5);
}
return ucwords($dummy);
}
throw new \RuntimeException(sprintf('Unrecognized dummy option "%s"', $dummy));
}
private function reverseBoolean($value = null, $theSwitch = false)
{
if (!$theSwitch) {
return;
}
return !$value;
}
/**
* @param string $text
* @return string
*/
private function printText($text)
{
echo $text;
}
}
interface Test1Interface
{
}
interface Test2Interface
{
}
class FooBarTest extends
\PHPUnit_Framework_TestCase
implements
Test1Interface,
Test2Interface
{
/**
* @expectedException Exception
*/
public function testFooBar($a)
{
$b = $a === 1 ? 'a' : 'b';
echo $b;;
}
}
final class FinalClass
{
final function finalMethod(){}
}
echo 1 ?>
Function Calls
None |
Stats
MD5 | 194bebafb0e38a8503a0a3f13b47b879 |
Eval Count | 0 |
Decode Time | 75 ms |