Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Ilia Alshanetsky
+1 On Mon, Feb 7, 2011 at 8:26 PM, Gustavo Lopes wrote: > The default serialize precision is currently [1] set at 100. A little code > inspection shows precision, in this case, takes the usual meaning of number > of significant digits. > > Given that the implicit precision of a (normal) IEEE 754

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Stan Vass
The default serialize precision is currently [1] set at 100. A little code inspection shows precision, in this case, takes the usual meaning of number of significant digits. Given that the implicit precision of a (normal) IEEE 754 double precision number is slightly less than 16 digits [2], th

[PHP-DEV] Static family

2011-02-08 Thread Sébastien Durand
Hi guys (and sorry for my english), For now, we have __callStatic, but we don't have __getStatic, __setStatic and so on. Will these functions be implemented in the near future ? These static functions are a nice addition and can do magic (registry pattern for example). http://sitten-polizei.d

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Nicolas Grekas
> ini_set('precision', 17); After some testings, here is what I get : The default precision of 14 (or 12) must have been chosen to address this overlong string representation of many simple floats ? While I agree with you that any data loss must be forbidden, couldn't this also break existing c

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Stan Vass
ini_set('precision', 17); After some testings, here is what I get : The default precision of 14 (or 12) must have been chosen to address this overlong string representation of many simple floats ? While I agree with you that any data loss must be forbidden, couldn't this also break existing c

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Gustavo Lopes
On Tue, 08 Feb 2011 20:05:05 -, Nicolas Grekas wrote: ini_set('precision', 17); After some testings, here is what I get : Yes, I think it's dangerous to change the default display precision lest we have a ton of applications that currently show 0.2 showing 0.20001.

Re: [PHP-DEV] Change default serialize precision from 100 to 17

2011-02-08 Thread Ben Schmidt
Yes, I think it's dangerous to change the default display precision lest we have a ton of applications that currently show 0.2 showing 0.20001. Exactly. And remember, PHP output is not necessarily just for web pages for humans to read. Other apps may rely on parsing this data, etc.,