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 namespace Twig\Tests\Profiler\Dumper; /* * This file is part of Twig. * * (c) F..

Decoded Output download

<?php

namespace Twig\Tests\Profiler\Dumper;

/*
 * This file is part of Twig.
 *
 * (c) Fabien Potencier
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Twig\Profiler\Dumper\HtmlDumper;

class HtmlTest extends AbstractTest
{
    public function testDump()
    {
        $dumper = new HtmlDumper();
        $this->assertStringMatchesFormat(<<<EOF
<pre>main <span style="color: #d44">%d.%dms/%d%</span>
 <span style="background-color: #ffd">index.twig</span> <span style="color: #d44">%d.%dms/%d%</span>
   embedded.twig::block(<span style="background-color: #dfd">body</span>)
   <span style="background-color: #ffd">embedded.twig</span>
    <span style="background-color: #ffd">included.twig</span>
   index.twig::macro(<span style="background-color: #ddf">foo</span>)
   <span style="background-color: #ffd">embedded.twig</span>
     <span style="background-color: #ffd">included.twig</span>
</pre>
EOF
            , $dumper->dump($this->getProfile()));
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Twig\Tests\Profiler\Dumper;

/*
 * This file is part of Twig.
 *
 * (c) Fabien Potencier
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Twig\Profiler\Dumper\HtmlDumper;

class HtmlTest extends AbstractTest
{
    public function testDump()
    {
        $dumper = new HtmlDumper();
        $this->assertStringMatchesFormat(<<<EOF
<pre>main <span style="color: #d44">%d.%dms/%d%</span>
 <span style="background-color: #ffd">index.twig</span> <span style="color: #d44">%d.%dms/%d%</span>
   embedded.twig::block(<span style="background-color: #dfd">body</span>)
   <span style="background-color: #ffd">embedded.twig</span>
    <span style="background-color: #ffd">included.twig</span>
   index.twig::macro(<span style="background-color: #ddf">foo</span>)
   <span style="background-color: #ffd">embedded.twig</span>
     <span style="background-color: #ffd">included.twig</span>
</pre>
EOF
            , $dumper->dump($this->getProfile()));
    }
}

Function Calls

None

Variables

None

Stats

MD5 f0a52061e920780102a729f93e59b0fc
Eval Count 0
Decode Time 114 ms