π Operation Mode
π Input (PHP Array Format)
Enter data on the left, view result on the right in real-time
π How to Use
Serialize: Enter a PHP-like array format (e.g. ["name"=>"John", "age"=>28]) to convert it to a PHP serialized string.
Unserialize: Enter a PHP serialized string (e.g. a:2:{s:4:"name";s:4:"John";s:3:"age";i:28;}) to restore it to a readable PHP array format.
Supported types: string, integer, double (float), boolean, null, array, and object.
π― Use Cases
- Session Debugging: View and analyze PHP session data
- Data Migration: Transfer serialized PHP data between systems
- Cache Analysis: Inspect serialized data stored in caches
- Security Audit: Examine serialized data for vulnerability analysis
β FAQ
What is PHP serialization?
PHP serialization converts PHP variables (arrays, objects, etc.) into a storable string format. The serialized string includes type and length information and can be restored using the unserialize() function.
What's the difference between serialization and JSON?
PHP serialization is PHP-specific and supports all PHP data types (including objects and references), but is not cross-language. JSON is a universal format supported by all languages but cannot represent PHP-specific object types and references.
Why does unserialization fail?
Common causes: corrupted serialized string (length mismatch), encoding issues, or the referenced class doesn't exist. Check that the serialized string is complete and intact.