Re: bless function: a better aproach
| From: | Curt Zirzow | Date: | Thu, 28 Oct 2004 02:20:29 +0000 |
| Subject: | Re: bless function: a better aproach | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200511@lists.php.net to get a copy of this message | ||
* Thus wrote Francisco M. Marzoa Alonso:
> Giving it a round, this seems to be a better aproach than the previous
> one. It has the advantage of provide direct access to the original array
> obtained from casting without boring about ___FAKE_KEYS_.
>
> <?
>...
>
>
> $Obj = new TestClass ();
> //$Clone = (array) $Obj;
>
> $Clone = obj2array ( $Obj );
I still dont see why a simple:
$obj = new TestClass();
$data = serialize($obj);
$Clone = unserialize($data);
Cant doesn't work for you.
Curt
--
Quoth the Raven, "Nevermore."