PHP Online Unserialize

What is PHP Online Unserialize?

In PHP, the serialize() function is used to serialize objects or arrays and returns a string containing a byte stream representing them.

PHP Unserialize is the reverse process of serialization, i.e., converting a byte stream back into an object.

Using our provided PHP Unserialize online tool, you can test serialized strings before serialization, or click 'PHP Online Compiler' to perform testing.

How to Use PHP Online Unserialize?

  1. Copy and paste your serialized code into the text area at the top;
  2. Click the "Unserialize" button;
  3. The result will be displayed in the JSON and PHP sections.

You can click the "Example" button to learn how to use it.

PHP Unserialize Example

We provide the following example to demonstrate how to use PHP Unserialize.

<?php
$ser = 'a:3:{s:2:"id";i:1;s:4:"name";s:4:"John";s:3:"age";i:32;}';
$ser = unserialize($ser);
var_dump($ser);
?>
Output:
array(3) {
["id"]=>
int(1)
["name"]=>
string(4) "John"
["age"]=>
int(32)
}