Re: [PHP3] Serialize Problem
| From: | jim kraai | Date: | Sun, 07 Nov 1999 17:03:19 +0000 |
| Subject: | Re: [PHP3] Serialize Problem | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-12192@lists.php.net to get a copy of this message | ||
Thies,
Thanks! This will help a lot. Could you post the diffs to the list?
--jim
"Thies C. Arntzen" wrote:
>
> On Fri, 5 Nov 1999, jim kraai wrote:
>
> > All,
> >
> > Why does serialize truncate floats?
>
> fixed in PHP 3 and PHP 4 CVS - thanx for the report - serialize now uses
> the precision as set in php[3].ini!
>
> >
> > Example via cmd-line:
> > <?php
> > $a = 3.1415926535897932384626433832795;
> > print $a;
> > Content-type: text/html
> >
> > 3.1415926535898
> >
> > print unserialize(serialize($a));
> > 3.14159
> >
> > print unserialize(serialize($a*10000));
> > 314159
> >
> > print unserialize(serialize($a*1000000));
> > 3141590
> > ?>
> >
> > Anybody know why this choice was made? Should we be fixing this?
> >
> > Also, two opinions on the serialize code--no offense meant.
> > 1. all that reallocation for every character is not exactly optimal
>
> reallocation takes place for every variable that get serialized (not every
> character) - that could be optimized - i agree.
>
> > 2. why is the type flag for an index the same as for an integer?
>
> because they are ints. and changing it now would make it it incompatible.
>
> regards,
> tc
>
> >
> > Thanks,
> >
> > --jim
> >
> > --
> > PHP 3 Mailing List <http://www.php.net/>
> > To unsubscribe, send an empty message to php3-unsubscribe@lists.php.net
> > To subscribe to the digest, e-mail: php3-digest-subscribe@lists.php.net
> > To search the mailing list archive, go to:
> > http://www.php.net/mailsearch.php3
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
> >
>
> Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
> Digital Collections Phone +49 40 235350 Fax +49 40 23535180
> Hammerbrookstr. 93 20097 Hamburg / Germany
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe@lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe@lists.php.net
> To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
--jim kraai
President, MURL.COM
My direct dial number is 319-369-0344x203