- var_export: documentation ( source)
<?php
class Hoge
{
protected $a = 'maa';
private $b = 2;
}
class TestHoge extends Hoge
{
public static function __set_state($an_array)
{
$obj = new A;
$obj->a = $an_array['a'];
$obj->b = $an_array['b'];
return $obj;
}
}
var_export(new TestHoge);