Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Creates a PHP value from a stored representation
<?php unserialize(string $data, array $options = []): mixed
<?php     public function __construct($recaller)

    {

        $this->recaller = @unserialize($recaller, ['allowed_classes' => false]) ?: $recaller;

    }
<?php     protected function attachRemainderOfChainToEndOfBatch(PendingBatch $batch)

    {

        if (! empty($this->chained)) {

            $next = unserialize(array_shift($this->chained));



            $next->chained = $this->chained;
<?php         }



        try {

            return unserialize($serialized);

        } catch (ModelNotFoundException) {

            return [];

        }
<?php     protected function unserialize($serialized)

    {

        return unserialize($serialized);

    }
<?php     public function dispatchNextJobInChain()

    {

        if (! empty($this->chained)) {

            dispatch(tap(unserialize(array_shift($this->chained)), function ($next) {

                $next->chained = $this->chained;



                $next->onConnection($next->connection ?: $this->chainConnection);
<?php         if (collect($expectedChain)->contains(fn ($job) => is_object($job))) {

            $expectedChain = collect($expectedChain)->map(fn ($job) => serialize($job))->all();

        } else {

            $chain = collect($this->chained)->map(fn ($job) => get_class(unserialize($job)))->all();

        }



        PHPUnit::assertTrue(
<?php             return;

        }



        return $this->serializesValues ? unserialize($item['value']) : $item['value'];

    }
<?php             $value = base64_decode($value);

        }



        return unserialize($value);

    }

}
<?php             return (float) $value;

        }



        return unserialize($value);

    }
<?php         }



        try {

            $data = unserialize(substr($contents, 10));

        } catch (Exception) {

            $this->forget($key);
<?php     protected function unserialize($value)

    {

        return is_numeric($value) ? $value : unserialize($value);

    }

}
<?php             throw new DecryptException('Could not decrypt the data.');

        }



        return $unserialize ? unserialize($decrypted) : $decrypted;

    }
<?php     protected function prepareData()

    {

        if (is_string($this->data)) {

            $this->data = unserialize($this->data);

        }

    }
<?php     {

        $unserialize = function ($value, $key, $hidden) {

            try {

                return tap($this->getRestoredPropertyValue(unserialize($value)), function ($value) {

                    if ($value instanceof __PHP_Incomplete_Class) {

                        throw new RuntimeException('Value is incomplete class: '.json_encode($value));

                    }
<?php         $this->sent = $data['sent'];



        $this->data = (($data['hasAttachments'] ?? false) === true)

            ? unserialize(base64_decode($data['data']))

            : $data['data'];

    }