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 LegacyTests\Browser\Init; use Livewire\Component; use Livewire\Livewire;..

Decoded Output download

<?php

namespace LegacyTests\Browser\Init;

use Livewire\Component;
use Livewire\Livewire;
use Tests\BrowserTestCase;

class Test extends BrowserTestCase
{
    public function test_wire_init(): void
    {
        Livewire::visit(new class extends Component {
            public $output = '';

            public function setOutputToFoo()
            {
                $this->output = 'foo';
            }

            public function render()
            {
                return <<<'HTML'
                    <div wire:init="setOutputToFoo">
                        <span dusk="output">{{ $output }}</span>
                    </div>
                HTML;
            }
        })
            /**
             * wire:init runs on page load.
             */
            ->waitForText('foo')
            ->assertSee('foo')
        ;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace LegacyTests\Browser\Init;

use Livewire\Component;
use Livewire\Livewire;
use Tests\BrowserTestCase;

class Test extends BrowserTestCase
{
    public function test_wire_init(): void
    {
        Livewire::visit(new class extends Component {
            public $output = '';

            public function setOutputToFoo()
            {
                $this->output = 'foo';
            }

            public function render()
            {
                return <<<'HTML'
                    <div wire:init="setOutputToFoo">
                        <span dusk="output">{{ $output }}</span>
                    </div>
                HTML;
            }
        })
            /**
             * wire:init runs on page load.
             */
            ->waitForText('foo')
            ->assertSee('foo')
        ;
    }
}

Function Calls

None

Variables

None

Stats

MD5 83348640ae65cb574b9ffb5ca4318a85
Eval Count 0
Decode Time 107 ms