Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- class Test
- {
- public $v1;
- private $v2;
- }
- $t = new Test();
- $s = serialize($t);
- echo $s;
- // value copied here or php won't unserialize
- $s = 'O:4:"Test":2:{s:2:"v1";N;s:8:"Testv2";N;}';
- $u = unserialize($s);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement