Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Kris Craig
1.01 eq 1.1 Could you explain this one to me? In every versioning system I've ever used, 1.1 would be greater than 1.01, not equal. On Fri, Jul 20, 2012 at 5:07 PM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! For example, I was not the only one who found it odd that 1.0 is

Re: [PHP-DEV] short_open_tags

2012-07-21 Thread Lester Caine
Rick Bird wrote: My name is Rick.. I done some light work on documentation side of things, but I had a question because I've been working a lot with the Symfony framework lately. Some in the Symfony irc room seem to be under the impression that short_open_tags is to be deprecated in php6.

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Andrew Faulds
Yeah, that would definitely be a bug. On Jul 21, 2012 7:23 AM, Kris Craig kris.cr...@gmail.com wrote: 1.01 eq 1.1 Could you explain this one to me? In every versioning system I've ever used, 1.1 would be greater than 1.01, not equal. On Fri, Jul 20, 2012 at 5:07 PM, Stas Malyshev

Re: [PHP-DEV] short_open_tags

2012-07-21 Thread Andrew Faulds
I also think ? is good. Consider: ? if (user.loggedin) ? a href=/logoutLogout/a ? elseif ? ? href=/loginLog in/a | a href=/registerRegister/a ? endif ? With ?php, it's less readable (it's not so bad, but I certainly prefer the former.) ?php if (user.loggedin) ? a href=/logoutLogout/a ?php

Re: [PHP-DEV] short_open_tags

2012-07-21 Thread Rasmus Lerdorf
On 07/20/2012 05:16 PM, Rick Bird wrote: Hi, My name is Rick.. I done some light work on documentation side of things, but I had a question because I've been working a lot with the Symfony framework lately. Some in the Symfony irc room seem to be under the impression that short_open_tags

Re: [PHP-DEV] Call for voting: [RFC] Allow use T_AS in closure use statement

2012-07-21 Thread Pierre Joye
hi Laruence, On Wed, Jul 18, 2012 at 4:54 PM, Laruence larue...@php.net wrote: Hi: Call for voting for Allow use T_AS in closure use statement, https://wiki.php.net/rfc/useas#voting any comment will be appreciated. Well, that's why the discussions period is required. Please close

Re: [PHP-DEV] Re: [RFC] foreach_variable supporting T_LIST

2012-07-21 Thread Morgan L. Owens
On 2012-07-21 12:19, Stas Malyshev wrote: Hi! So when I have a function that has a two- or multi-part result then - instead of having one part as the return value and the others by reference - in Python I'd return a tuple. PHP functions can return arrays and some do - e.g. pathinfo(). But

Re: [PHP-DEV] Call for voting: [RFC] Allow use T_AS in closure use statement

2012-07-21 Thread Laruence
On Sat, Jul 21, 2012 at 4:13 PM, Pierre Joye pierre@gmail.com wrote: hi Laruence, On Wed, Jul 18, 2012 at 4:54 PM, Laruence larue...@php.net wrote: Hi: Call for voting for Allow use T_AS in closure use statement, https://wiki.php.net/rfc/useas#voting any comment will be

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Pierre Joye
hi! On Fri, Jul 20, 2012 at 2:40 PM, Rasmus Schultz ras...@mindplay.dk wrote: Of course that would break backwards compatibility, which kind of defeats the purpose of having a standardized version-number comparison standard. x.y.z is standard, x.y not. I keep asking package maintainers to use

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Andrew Faulds
What? x, x.y, x.y.z, x.y.z.a, etc are all valid. 1, 1.1, 1.1.2, 1.1.2.3, in that order, would be valid. On Jul 21, 2012 10:07 AM, Pierre Joye pierre@gmail.com wrote: hi! On Fri, Jul 20, 2012 at 2:40 PM, Rasmus Schultz ras...@mindplay.dk wrote: Of course that would break backwards

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Pierre Joye
hi, No, I mean version with 1.0 and not 1.0.0 are not. They are just not correct and confusing, as you noticed. On Sat, Jul 21, 2012 at 11:19 AM, Andrew Faulds ajf...@googlemail.com wrote: What? x, x.y, x.y.z, x.y.z.a, etc are all valid. 1, 1.1, 1.1.2, 1.1.2.3, in that order, would be valid.

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Andrew Faulds
1, 1.0, 1.0.0, 1.0.0.0, 1.0.0.0.0 etc. are not confusing, they are completely correct, and all mean the same thing. If I publish MyApp v1, v1.0 and v1.0.0 are the same. On Jul 21, 2012 10:32 AM, Pierre Joye pierre@gmail.com wrote: hi, No, I mean version with 1.0 and not 1.0.0 are not.

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Tjerk Meesters
On 21 Jul, 2012, at 2:22 PM, Kris Craig kris.cr...@gmail.com wrote: 1.01 eq 1.1 Could you explain this one to me? In every versioning system I've ever used, 1.1 would be greater than 1.01, not equal. Because 01 is just a padded version of 1, probably used to make it easier for

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Andrew Faulds
To follow that up, this is how version numbers are sorted: 1, 1.0, 1a, 1.0.1, 1.0.1a, 1.0.1.1, 2, 2.0.1 The first number is always most significant, followed by each number after it (not necessarily single digits, ReactOS has 0.3.14 for instance), then finally any letters at the end. Equivalence

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Andrew Faulds
If you think 1.1 =/= 1.01 you're sure using some weird version numbers. Only 1.0.1 would be smaller. Has anyone seen these weird version ordering schemes in practise? On any major projects of note? On Jul 21, 2012 10:51 AM, Tjerk Meesters tjerk.meest...@gmail.com wrote: On 21 Jul, 2012, at

Re: [PHP-DEV] zend_parse_parameters() improvements

2012-07-21 Thread Pierre Joye
hi! On Fri, Jul 20, 2012 at 12:20 AM, Sara Golemon poll...@php.net wrote: Okay, well... the main pieces of feedback I'd give on it then is to not change the behavior of the '!' modifier. That's bad BC. Fully agreed, if we can avoid the introduction of yet another set of #ifdef, then I'm all

Re: [PHP-DEV] RFC Proposal - Attributes read/write visibility

2012-07-21 Thread Amaury Bouchard
Thank you Matthew. I had the feeling that my proposal was dismissed a bit quickly by some people, while I think it's how object-oriented languages should handle attributes' visibility. I still think it's very simple and elegant, and more coherent in some situations (those situations targeted by

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Ángel González
On 21/07/12 11:32, Pierre Joye wrote: hi, No, I mean version with 1.0 and not 1.0.0 are not. They are just not correct and confusing, as you noticed. Then Linux 2.6.39 shouldn't have been followed by Linux 3.0 For me, 1.0 and 1.0.0 are the same thing. It's fine if x.y is not a valid

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Andrew Faulds
Maybe it should have an optional extra parameter specifying comparison mode? (I.e. version formatting) On Jul 21, 2012 1:08 PM, Ángel González keis...@gmail.com wrote: On 21/07/12 11:32, Pierre Joye wrote: hi, No, I mean version with 1.0 and not 1.0.0 are not. They are just not correct

Re: [PHP-DEV] zend_parse_parameters() improvements

2012-07-21 Thread Gustavo Lopes
Em Sat, 21 Jul 2012 13:13:23 +0200, Pierre Joye pierre@gmail.com escreveu: On Fri, Jul 20, 2012 at 12:20 AM, Sara Golemon poll...@php.net wrote: Okay, well... the main pieces of feedback I'd give on it then is to not change the behavior of the '!' modifier. That's bad BC. Fully

Re: [PHP-DEV] zend_parse_parameters() improvements

2012-07-21 Thread Pierre Joye
hi Gustavo, On Sat, Jul 21, 2012 at 2:11 PM, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: Em Sat, 21 Jul 2012 13:13:23 +0200, Pierre Joye pierre@gmail.com escreveu: On Fri, Jul 20, 2012 at 12:20 AM, Sara Golemon poll...@php.net wrote: Okay, well... the main pieces of feedback I'd give

Re: [PHP-DEV] Internal iteration API

2012-07-21 Thread Johannes Schlüter
On Fri, 2012-07-13 at 10:32 +1000, David Muir wrote: What about extending the array typehint include ArrayAccess, and extend the Traversable typehint to include arrays? For that all (internal) consumers of Traversable have to work with arrays. i.e. ?php new IteratorIterator([1,2,3,4,5]); ?.

RE: [PHP-DEV] Re: Generators in PHP

2012-07-21 Thread Jared Williams
-Original Message- From: Nikita Popov [mailto:nikita@gmail.com] Sent: 20 July 2012 21:46 To: Nikita Popov Cc: PHP internals Subject: [PHP-DEV] Re: Generators in PHP On Tue, Jun 5, 2012 at 7:35 PM, Nikita Popov nikita@googlemail.com wrote: Hi internals! In the

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Rasmus Schultz
using this particular version-numbering scheme, 1.01 is equal to 1.1 - I don't think that's a bug, because the version-numbers in this version-numbering scheme are integers, not decimals. so I believe this is in fact as correct as it can be, since numbers like 01 should not really be used in this

Re: [PHP-DEV] common issue with version_compare()

2012-07-21 Thread Kris Craig
On Sat, Jul 21, 2012 at 3:09 AM, Andrew Faulds ajf...@googlemail.comwrote: If you think 1.1 =/= 1.01 you're sure using some weird version numbers. Only 1.0.1 would be smaller. Has anyone seen these weird version ordering schemes in practise? On any major projects of note? *raises his hand*

[PHP-DEV] Re: [PHP-CVS] com php-src: Refactored internal_get_timestamp(): ext/intl/dateformat/dateformat_format.c

2012-07-21 Thread Rasmus Lerdorf
Your commit reminded me that we should probably look into providing access to the low-level monotonic clock. eg. CLOCK_MONOTONIC_RAW described here: http://www.kernel.org/doc/man-pages/online/pages/man2/clock_getres.2.html There is a monotonic clock library here that should help with