State::__toString()

Proxy for the current object, casted as a string.

Table of Contents
  1. Description
  2. Example

Description

State::__toString(): string;

This method will be called when you cast a State instance as a string. This method returns all states represented as a PHP serialized string.

Example

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

echo $state; // Returns `'a:1:{s:4:"test";i:1;}'`

State::__toString()

Proxy for the current object, casted as a string.