Re: Serializing data
| From: | Brent Cook | Date: | Wed, 18 Sep 2002 14:10:38 +0000 |
| Subject: | Re: Serializing data | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-9162@lists.php.net to get a copy of this message | ||
On Wed, 18 Sep 2002, Mika Tuupola wrote:
> On Wed, 18 Sep 2002, Brent Cook wrote:
>
> > I've also been looking at wddx, which looks to be more amicable with other
> > languages. However, it may not be widely available with PHP installations
> > and I want to keep the prerequisites low.
> >
> > What say you? Should I stick with my old methods, write new ones, or is
> > there something better?
>
> Even though wddx might not be available in all installations
> I would atleast include (optional) support for it. For some weird
> reason I like wddx.
I'm sure that it's not an uncommon affliction. I'm now thinking of using
wddx by default and serialize as a fall-back. If there are different
formats however, I need auto-detect support and would like at least two
languages to support everything.
Differentiating wddx from serialize() shouldn't be a big deal; just
compare the first characters of the stream: '<' for wddx, 'a' for
serialize(array). They're both supported by PHP and Perl, and wddx is
supported in just about everything.
Thanks
- Brent