Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Pierre Joye
On Tue, Oct 5, 2010 at 5:48 AM, Richard Lynch wrote: > On Sun, October 3, 2010 6:27 pm, Stas Malyshev wrote: >>> It looks like a sub optimal choice to have used string constants >>> instead of integer. However it could be still possible to define new >>> constants as numeric. It is then possible t

Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Richard Lynch
On Sun, October 3, 2010 6:27 pm, Stas Malyshev wrote: >> It looks like a sub optimal choice to have used string constants >> instead of integer. However it could be still possible to define new >> constants as numeric. It is then possible to do whatever needs to be >> done as post or pre ops for th

Re: [PHP-DEV] RFC: Comparable interface

2010-10-04 Thread Richard Lynch
On Sun, October 3, 2010 6:18 pm, Stas Malyshev wrote: >> $a = new stdclass; >> $a->prop = null; >> $b = new stdclass; >> $b->prop2 = null; >> >> var_dump($a> $b); //false >> var_dump($a == $b); //false >> var_dump($b> $a); //false > > That's because there's no total ordering of generic objects th

Re: [PHP-DEV] RFC: Comparable interface

2010-10-04 Thread Richard Lynch
On Sun, October 3, 2010 12:34 pm, Gustavo Lopes wrote: > * The current behavior for >, <, etc. is completely useless. It's > unpredictable and it doesn't even establish a total order: > > $a = new stdclass; > $a->prop = null; > $b = new stdclass; > $b->prop2 = null; > > var_dump($a > $b); //false >

RE: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Jared Williams
> -Original Message- > From: Derick Rethans [mailto:der...@php.net] > Sent: 04 October 2010 09:55 > To: Stas Malyshev > Cc: PHP Internals > Subject: Re: [PHP-DEV] rfc2616 datetime format? > > On Sun, 3 Oct 2010, Stas Malyshev wrote: > > > > The reason is that in order to format a Date

[PHP-DEV] mt_rand deprecated in trunk?

2010-10-04 Thread Michael Maclean
Hi, The comment on this commit: http://svn.php.net/viewvc?view=revision&revision=303912 suggest getrandmax() and mt_getrandmax() were to be deprecated, but it seems Kalle might have typoed and deprecated mt_rand() instead - is that the case? -- Cheers, Michael -- PHP Internals - PHP Runtime D

Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Pierre Joye
On Mon, Oct 4, 2010 at 1:17 PM, Hannes Magnusson wrote: > I am afraid that would break craploads of applications, and become > very confusing. That's why I said "BC" earlier. But it could work for new formats. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org --

Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Pierre Joye
On Mon, Oct 4, 2010 at 10:42 AM, Derick Rethans wrote: > On Mon, 4 Oct 2010, Pierre Joye wrote: > >> On Mon, Oct 4, 2010 at 1:27 AM, Stas Malyshev wrote: >> > >> >> It looks like a sub optimal choice to have used string constants >> >> instead of integer. However it could be still possible to def

Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Hannes Magnusson
On Mon, Oct 4, 2010 at 11:29, Pierre Joye wrote: > On Mon, Oct 4, 2010 at 10:42 AM, Derick Rethans wrote: >> On Mon, 4 Oct 2010, Pierre Joye wrote: >> >>> On Mon, Oct 4, 2010 at 1:27 AM, Stas Malyshev >>> wrote: >>> > >>> >> It looks like a sub optimal choice to have used string constants >>> >

Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Derick Rethans
On Mon, 4 Oct 2010, Pierre Joye wrote: > On Mon, Oct 4, 2010 at 1:27 AM, Stas Malyshev wrote: > > > >> It looks like a sub optimal choice to have used string constants > >> instead of integer. However it could be still possible to define new > >> constants as numeric. It is then possible to do wh

Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Derick Rethans
On Sun, 3 Oct 2010, Stas Malyshev wrote: > > The reason is that in order to format a DateTime object as GMT, it > > needs to be converted to GMT... and you can't simply do that with > > just a constant consisting of a string of format characters. > > I see what you mean and it makes sense, havi