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 declare(strict_types = 1); use Symfony\Component\DomCrawler\Crawler; /** * Illus..

Decoded Output download

<?php

declare(strict_types = 1);

use Symfony\Component\DomCrawler\Crawler;

/**
 * Illustrates a way to manipulate HTML documents by leveraging the Symfony DOM Crawler component.
 *
 * This is used by the @AfterTableFetch example hook implementation.
 *
 * @see FeatureContext::stripScreenReaderElements()
 */
class HtmlManipulator extends Crawler
{

    /**
     * Removes the elements that match the given CSS selector from the document.
     *
     * @param string $selector
     *   The CSS selector.
     *
     * @return HtmlManipulator
     */
    public function removeElements(string $selector): self
    {
        /** @var DOMElement $node */
        foreach ($this->filter($selector) as $node) {
            $node->parentNode->removeChild($node);
        }
        return $this;
    }

}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types = 1);

use Symfony\Component\DomCrawler\Crawler;

/**
 * Illustrates a way to manipulate HTML documents by leveraging the Symfony DOM Crawler component.
 *
 * This is used by the @AfterTableFetch example hook implementation.
 *
 * @see FeatureContext::stripScreenReaderElements()
 */
class HtmlManipulator extends Crawler
{

    /**
     * Removes the elements that match the given CSS selector from the document.
     *
     * @param string $selector
     *   The CSS selector.
     *
     * @return HtmlManipulator
     */
    public function removeElements(string $selector): self
    {
        /** @var DOMElement $node */
        foreach ($this->filter($selector) as $node) {
            $node->parentNode->removeChild($node);
        }
        return $this;
    }

}

Function Calls

None

Variables

None

Stats

MD5 143397bc5167e27c2a04aed143f5b089
Eval Count 0
Decode Time 102 ms