MagicalSerializer/b.php

23 lines
461 B
PHP
Raw Normal View History

2017-04-30 18:38:55 +02:00
<?php
2017-04-30 18:44:58 +02:00
2017-04-30 18:38:55 +02:00
require 'vendor/autoload.php';
2017-04-30 18:44:58 +02:00
class a extends \danog\SerializableVolatile
{
public function ___construct()
{
var_dump('CONSTRUCTED a');
}
public function __wakeup()
{
var_dump('WOKE UP a');
}
}
new a();
class b extends \danog\SerializableVolatile
{
2017-04-30 18:38:55 +02:00
}
$result = \danog\Serialization::unserialize(file_get_contents('test'));
var_dump($result);
file_put_contents('testb', \danog\Serialization::serialize($result));