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 smalys...@sugarcrm.com 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

Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Pierre Joye
On Mon, Oct 4, 2010 at 10:42 AM, Derick Rethans der...@php.net wrote: On Mon, 4 Oct 2010, Pierre Joye wrote: On Mon, Oct 4, 2010 at 1:27 AM, Stas Malyshev smalys...@sugarcrm.com wrote: It looks like a sub optimal choice to have used string constants instead of integer. However it could be

Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Pierre Joye
On Mon, Oct 4, 2010 at 1:17 PM, Hannes Magnusson hannes.magnus...@gmail.com 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 |

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, having

Re: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Hannes Magnusson
On Mon, Oct 4, 2010 at 11:29, Pierre Joye pierre@gmail.com wrote: On Mon, Oct 4, 2010 at 10:42 AM, Derick Rethans der...@php.net wrote: On Mon, 4 Oct 2010, Pierre Joye wrote: On Mon, Oct 4, 2010 at 1:27 AM, Stas Malyshev smalys...@sugarcrm.com wrote: It looks like a sub optimal

[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=revisionrevision=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

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 DateTime object

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 var_dump($a

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 that can make sense.

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 the