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 Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Controller\ControllerReference;
use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface;
use Twig\Environment;

class FragmentController
{
    public function indexAction(Environment $twig)
    {
        return new Response($twig->render('fragment.html.twig', ['bar' => new Bar()]));
    }

    public function inlinedAction($options, $_format)
    {
        return new Response($options['bar']->getBar().' '.$_format);
    }

    public function customFormatAction($_format)
    {
        return new Response($_format);
    }

    public function customLocaleAction(Request $request)
    {
        return new Response($request->getLocale());
    }

    public function forwardLocaleAction(Request $request)
    {
        return new Response($request->getLocale());
    }

    public function fragmentUriAction(Request $request, FragmentUriGeneratorInterface $fragmentUriGenerator)
    {
        return new Response($fragmentUriGenerator->generate(new ControllerReference(self::class.'::indexAction'), $request));
    }
}

class Bar
{
    private string $bar = 'bar';

    public function getBar()
    {
        return $this->bar;
    }
}
 ?>

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 Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Controller\ControllerReference;
use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface;
use Twig\Environment;

class FragmentController
{
    public function indexAction(Environment $twig)
    {
        return new Response($twig->render('fragment.html.twig', ['bar' => new Bar()]));
    }

    public function inlinedAction($options, $_format)
    {
        return new Response($options['bar']->getBar().' '.$_format);
    }

    public function customFormatAction($_format)
    {
        return new Response($_format);
    }

    public function customLocaleAction(Request $request)
    {
        return new Response($request->getLocale());
    }

    public function forwardLocaleAction(Request $request)
    {
        return new Response($request->getLocale());
    }

    public function fragmentUriAction(Request $request, FragmentUriGeneratorInterface $fragmentUriGenerator)
    {
        return new Response($fragmentUriGenerator->generate(new ControllerReference(self::class.'::indexAction'), $request));
    }
}

class Bar
{
    private string $bar = 'bar';

    public function getBar()
    {
        return $this->bar;
    }
}

Function Calls

None

Variables

None

Stats

MD5 e5dc436c8a9697f5a3b0b60515254ef0
Eval Count 0
Decode Time 69 ms