Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'ExampleClass.php';
- $object = new stdClass;
- $object->foo = 'bar';
- $class = new ExampleClass();
- $data = [
- 'int' => 123,
- 'string' => 'foo',
- 'bool' => true,
- 'object' => $object,
- 'class' => $class,
- ];
- $serialized = serialize($data);
- file_put_contents('serialized1.txt', $serialized);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement