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\Component\Serializer\Tests\Fixtures\Attributes;

use Symfony\Component\Serializer\Attribute\Context;

/**
 * @author Maxime Steinhausser <[email protected]>
 */
class ContextDummyPromotedProperties extends ContextDummyParent
{
    public function __construct(
        #[Context(['foo' => 'value', 'bar' => 'value', 'nested' => [
            'nested_key' => 'nested_value',
        ], 'array' => ['first', 'second']])]
        #[Context(context: ['bar' => 'value_for_group_a'], groups: ['a'])]
        public $foo,

        #[Context(
            normalizationContext: ['format' => 'd/m/Y'],
            denormalizationContext: ['format' => 'm-d-Y H:i'],
            groups: ['a', 'b'],
        )]
        public $bar,

        #[Context(normalizationContext: ['prop' => 'dummy_value'])]
        public $overriddenParentProperty,
    ) {
    }

    #[Context(['method' => 'method_with_context'])]
    public function getMethodWithContext()
    {
        return 'method_with_context';
    }
}
 ?>

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\Component\Serializer\Tests\Fixtures\Attributes;

use Symfony\Component\Serializer\Attribute\Context;

/**
 * @author Maxime Steinhausser <[email protected]>
 */
class ContextDummyPromotedProperties extends ContextDummyParent
{
    public function __construct(
        #[Context(['foo' => 'value', 'bar' => 'value', 'nested' => [
            'nested_key' => 'nested_value',
        ], 'array' => ['first', 'second']])]
        #[Context(context: ['bar' => 'value_for_group_a'], groups: ['a'])]
        public $foo,

        #[Context(
            normalizationContext: ['format' => 'd/m/Y'],
            denormalizationContext: ['format' => 'm-d-Y H:i'],
            groups: ['a', 'b'],
        )]
        public $bar,

        #[Context(normalizationContext: ['prop' => 'dummy_value'])]
        public $overriddenParentProperty,
    ) {
    }

    #[Context(['method' => 'method_with_context'])]
    public function getMethodWithContext()
    {
        return 'method_with_context';
    }
}

Function Calls

None

Variables

None

Stats

MD5 05e84a85b9b175e134c7eebac28652c0
Eval Count 0
Decode Time 77 ms