# PHP (De-)Serialization A basic example of (de-)serialization is the following Serialize is show in the following snippet. ```php "Hello, World!", "content" => "Lore Ipsum Dolor"); $serialized = serialize($plain_text); file_put_contents('serialized.txt', $serialized); ?> ``` Deserialize is done in the following snippet. ```php ``` ## Unserialize * [Not so secure](https://notsosecure.com/remote-code-execution-via-php-unserialize) Serialize a form on a website through PHP via ```php '; } print urlencode(serialize(new FormSubmit)); ?> ``` ```php '; } echo (serialize(new file)); ?> ```