Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. <?php
  2.  
  3. include 'ExampleClass.php';
  4.  
  5. $object = new stdClass;
  6. $object->foo = 'bar';
  7.  
  8. $class = new ExampleClass();
  9.  
  10. $data = [
  11. 'int' => 123,
  12. 'string' => 'foo',
  13. 'bool' => true,
  14. 'object' => $object,
  15. 'class' => $class,
  16. ];
  17.  
  18. $serialized = serialize($data);
  19.  
  20. file_put_contents('serialized1.txt', $serialized);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement