State::__isset()

Checks if a state returns non-null value.

Table of Contents
  1. Description
  2. Example

Description

State::__isset(string $key): bool;

You won’t use this method directly, it will be executed automatically when you try to check the existence of a state using empty() or isset() language construct. This method is also compatible when you try to access a state deeply.

Example

$state = new State(['test' => 1]);

test(isset($state->test)); // Returns `true`
test(isset($state->test->asdf)); // Returns `false`

State::__isset()

Checks if a state returns non-null value.