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 WireUi\View; use Illuminate\View\Compilers\ComponentTagCompiler; use Wir..

Decoded Output download

<?php

namespace WireUi\View;

use Illuminate\View\Compilers\ComponentTagCompiler;
use WireUi\Facades\WireUiDirectives;

class WireUiTagCompiler extends ComponentTagCompiler
{
    public function compile($value)
    {
        return $this->compileWireUiSelfClosingTags($value);
    }

    private function compileWireUiSelfClosingTags($value)
    {
        $pattern = '/<\s*wireui\:(scripts|styles)\s*\/?>/';

        return preg_replace_callback($pattern, function (array $matches) {
            $element = '<script>throw new Error("Wrong <wireui:scripts /> usage. It should be <wireui:scripts />")</script>';

            if ($matches[1] === 'scripts') {
                $element = WireUiDirectives::scripts();
            }

            if ($matches[1] === 'styles') {
                $element = WireUiDirectives::styles();
            }

            return $element;
        }, $value);
    }
}

Did this file decode correctly?

Original Code

<?php

namespace WireUi\View;

use Illuminate\View\Compilers\ComponentTagCompiler;
use WireUi\Facades\WireUiDirectives;

class WireUiTagCompiler extends ComponentTagCompiler
{
    public function compile($value)
    {
        return $this->compileWireUiSelfClosingTags($value);
    }

    private function compileWireUiSelfClosingTags($value)
    {
        $pattern = '/<\s*wireui\:(scripts|styles)\s*\/?>/';

        return preg_replace_callback($pattern, function (array $matches) {
            $element = '<script>throw new Error("Wrong <wireui:scripts /> usage. It should be <wireui:scripts />")</script>';

            if ($matches[1] === 'scripts') {
                $element = WireUiDirectives::scripts();
            }

            if ($matches[1] === 'styles') {
                $element = WireUiDirectives::styles();
            }

            return $element;
        }, $value);
    }
}

Function Calls

None

Variables

None

Stats

MD5 757fc92dc866334b6fedd7ac8eed1b24
Eval Count 0
Decode Time 111 ms