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 Livewire\Mechanisms\HandleComponents; use AllowDynamicProperties; #[All..

Decoded Output download

<?php

namespace Livewire\Mechanisms\HandleComponents;

use AllowDynamicProperties;

#[AllowDynamicProperties]
class ComponentContext
{
    public $effects = [];
    public $memo = [];

    public function __construct(
        public $component,
        public $mounting = false,
    ) {}

    public function isMounting()
    {
        return $this->mounting;
    }

    public function addEffect($key, $value)
    {
        if (is_array($key)) {
            foreach ($key as $iKey => $iValue) $this->addEffect($iKey, $iValue);

            return;
        }

        $this->effects[$key] = $value;
    }

    public function pushEffect($key, $value, $iKey = null)
    {
        if (! isset($this->effects[$key])) $this->effects[$key] = [];

        if ($iKey) {
            $this->effects[$key][$iKey] = $value;
        } else {
            $this->effects[$key][] = $value;
        }
    }

    public function addMemo($key, $value)
    {
        $this->memo[$key] = $value;
    }

    public function pushMemo($key, $value, $iKey = null)
    {
        if (! isset($this->memo[$key])) $this->memo[$key] = [];

        if ($iKey) {
            $this->memo[$key][$iKey] = $value;
        } else {
            $this->memo[$key][] = $value;
        }
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Livewire\Mechanisms\HandleComponents;

use AllowDynamicProperties;

#[AllowDynamicProperties]
class ComponentContext
{
    public $effects = [];
    public $memo = [];

    public function __construct(
        public $component,
        public $mounting = false,
    ) {}

    public function isMounting()
    {
        return $this->mounting;
    }

    public function addEffect($key, $value)
    {
        if (is_array($key)) {
            foreach ($key as $iKey => $iValue) $this->addEffect($iKey, $iValue);

            return;
        }

        $this->effects[$key] = $value;
    }

    public function pushEffect($key, $value, $iKey = null)
    {
        if (! isset($this->effects[$key])) $this->effects[$key] = [];

        if ($iKey) {
            $this->effects[$key][$iKey] = $value;
        } else {
            $this->effects[$key][] = $value;
        }
    }

    public function addMemo($key, $value)
    {
        $this->memo[$key] = $value;
    }

    public function pushMemo($key, $value, $iKey = null)
    {
        if (! isset($this->memo[$key])) $this->memo[$key] = [];

        if ($iKey) {
            $this->memo[$key][$iKey] = $value;
        } else {
            $this->memo[$key][] = $value;
        }
    }
}

Function Calls

None

Variables

None

Stats

MD5 5f991c46ced6a22259636f4bd053fc16
Eval Count 0
Decode Time 90 ms