Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread David Muir
On 24/11/11 12:44, Ferenc Kovacs wrote: > > > On Thu, Nov 24, 2011 at 1:38 AM, David Muir > wrote: > > Just to clarify, the changes introduced in 5.4 will result in the > following: > > > $string = 'foo'; > $array = array( >'foo' => array(

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Anthony Ferrara
One thing to note. The good test for what's being talked about would be simple: isset($foo['bar'][1]['baz']) && is_array($foo['bar'][1]) You don't need to check each level. Only the one above the key you're looking at. I think it would be a good idea to raise a notice on string index conversio

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Ferenc Kovacs
On Thu, Nov 24, 2011 at 1:38 AM, David Muir wrote: > On 24/11/11 06:25, Stas Malyshev wrote: > > Hi! > > > >> The only case where the 5.4 branch works differently as before if you > >> reference a string type(int, float, etc. won't trigger this) variable > >> using an associative index and you ex

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Stas Malyshev
Hi! And I believe you're missing the point. I'm not suggesting it for 5.4, but illustrating that until something like it (or better) exists, the "bug fix" should wait until such a solution exists. Again, you seem to miss the major point. The bug fix was fixing the result of string operation,

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Stas Malyshev
Hi! But neither is introducing a potential bomb of the kind that the 'date' saga created. The problem this change IS causing is likely to hit many live sites The claim that many live sites actually regularly use string multiple string offsets to distinguish strings from arrays sounds implausi

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread David Muir
On 24/11/11 11:42, Stas Malyshev wrote: > Hi! > >> If you want this fix to be palatable, we'll need a new language >> construct that effectively runs a series of is_array&& array_key_exists >> with a final !== null check. > > I'm not sure RC time is a good place for introducing new language > cons

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Lester Caine
Stas Malyshev wrote: If you want this fix to be palatable, we'll need a new language construct that effectively runs a series of is_array&& array_key_exists with a final !== null check. I'm not sure RC time is a good place for introducing new language constructs. Actually, I'm pretty sure it's

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Stas Malyshev
Hi! If you want this fix to be palatable, we'll need a new language construct that effectively runs a series of is_array&& array_key_exists with a final !== null check. I'm not sure RC time is a good place for introducing new language constructs. Actually, I'm pretty sure it's not. -- Stan

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread David Muir
On 24/11/11 06:25, Stas Malyshev wrote: > Hi! > >> The only case where the 5.4 branch works differently as before if you >> reference a string type(int, float, etc. won't trigger this) variable >> using an associative index and you expect it that to be undefined >> variable even though that the doc

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Stas Malyshev
Hi! As distasteful as it seems, it absolutely should be reverted IMHO. You seem to misunderstand something here. This behavior is a direct consequence of string offset result being a string. To revert it means to reintroduce broken string-offset pseudo-var-type that led to huge amount of bu

RE: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Mike Robinson
On November-23-11 5:31 PM Gustavo Lopes wrote: > On Wed, 23 Nov 2011 21:06:09 -, Pierre Joye > wrote: > > > The fact that we have reports here showing code not working anymore > > because of this change tells me that it is a BC break. We can call it > > a bug fix but it still breaks code out

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Gustavo Lopes
On Wed, 23 Nov 2011 21:06:09 -, Pierre Joye wrote: The fact that we have reports here showing code not working anymore because of this change tells me that it is a BC break. We can call it a bug fix but it still breaks code out there for no real benefit but edge case usages. We had this s

Re: [PHP-DEV] news.php.net archive

2011-11-23 Thread Philip Olson
On Nov 23, 2011, at 11:45 AM, Stas Malyshev wrote: > Hi! > >> You mean hosting our own, or using some third party service? >> Usually I prefer http://www.mail-archive.com/internals@lists.php.net/ >> Unfortunately not all of our lists are mirrored there. > > Well, yes, I know there are various p

Re: [PHP-DEV] news.php.net archive

2011-11-23 Thread Pierre Joye
On Wed, Nov 23, 2011 at 8:45 PM, Stas Malyshev wrote: > Well, yes, I know there are various places where PHP lists are archived. My > point is if we have official archive on news.php.net why not make it usable? It is not an archive per se but the news (nntp) frontend, code is here: http://svn.p

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Pierre Joye
On Wed, Nov 23, 2011 at 8:47 PM, Daniel Convissor wrote: > This is the first time in ten years I heard about string array keys > being converted to integers (all be it in the context of string > offsets). They are not keys but offset in this case :) Not sure we can change that without breaking

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Pierre Joye
On Wed, Nov 23, 2011 at 7:57 PM, Stas Malyshev wrote: > Hi! > >> Unless I'm mistaken it seems that we have a clear and vicious BC break >> here, the kind of changes that are annoying to catch and does not > > No, we do not have a BC break here, we have a bugfix here that makes string > ops work co

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Daniel Convissor
Hi Stas: > I'm sorry that influences you code, it is unfortunate, but relying > on an obscure bug, however convenient, is not a good practice. Please don't put this on me. It's not about me. It's about many, many developers who have this usage in many places. This change will open up many unex

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Stas Malyshev
Hi! The fix to make $a[0][0] work is good. No argument here. Then the rest of the discussion is moot for 5.4, as that's the only change that happened. The problem arises where programmers wrote code anticipating the incoming variable is an array but another programmer has passed in a stri

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Christopher Jones
On 11/22/2011 06:31 PM, Daniel Convissor wrote: Hi Etienne: AFAIK this is one of the change that was explicitly put in to make it more consistent. But now it breaks code in the wild. I came across this due to an isset() in PEAR now passing when it didn't before. Thanks, --Dan Since we

Re: [PHP-DEV] pg_escape_literal(), pg_escape_identifier() patch

2011-11-23 Thread Yasuo Ohgaki
Hi Stats, 2011/11/24 Stas Malyshev : > Hi! > >> These escape functions are not mandatory, but these functions increase >> usability of PHP and pgsql module. >> >> Do you think it is ok to merge the patch to 5.4 branch? > > Unless there's a very compelling reason for that (i.e., security > implicat

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Daniel Convissor
Hi Stas: > I am 100% opposed to changing anything there and > re-breaking string offsets because somebody uses string indexes to > operate on strings and expect them to work in weird ways that makes > $a[0][0] work differently from $b = $a[0]; $b[0]. The fix to make $a[0][0] work is good. No arg

Re: [PHP-DEV] news.php.net archive

2011-11-23 Thread Stas Malyshev
Hi! You mean hosting our own, or using some third party service? Usually I prefer http://www.mail-archive.com/internals@lists.php.net/ Unfortunately not all of our lists are mirrored there. Well, yes, I know there are various places where PHP lists are archived. My point is if we have officia

Re: [PHP-DEV] news.php.net archive

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 8:40 PM, Stas Malyshev wrote: > Hi! > > I have been using news.php.net ML archive a couple of times lately, and I > must say unfortunately it's not the best ML archive I have seen around. No > search, no indexing by date/topic, references are sometimes messed up, etc. > So

[PHP-DEV] news.php.net archive

2011-11-23 Thread Stas Malyshev
Hi! I have been using news.php.net ML archive a couple of times lately, and I must say unfortunately it's not the best ML archive I have seen around. No search, no indexing by date/topic, references are sometimes messed up, etc. So my question is - isn't it the time to upgrade it to some good

Re: [PHP-DEV] pg_escape_literal(), pg_escape_identifier() patch

2011-11-23 Thread Stas Malyshev
Hi! These escape functions are not mandatory, but these functions increase usability of PHP and pgsql module. Do you think it is ok to merge the patch to 5.4 branch? Unless there's a very compelling reason for that (i.e., security implications, missing support for a widely used part of exist

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Stas Malyshev
Hi! The only case where the 5.4 branch works differently as before if you reference a string type(int, float, etc. won't trigger this) variable using an associative index and you expect it that to be undefined variable even though that the documentation explicitly states that the Actually, the

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 7:57 PM, Stas Malyshev wrote: > Hi! > > > Unless I'm mistaken it seems that we have a clear and vicious BC break >> here, the kind of changes that are annoying to catch and does not >> > > No, we do not have a BC break here, we have a bugfix here that makes > string ops wo

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 7:52 PM, Stas Malyshev wrote: > Hi! > > > On 11/23/11 6:14 AM, Daniel Convissor wrote: > >> To me, this is the bug. $a['blah'] does not exist. An undefined index >> > > If it's a bug, this bug was in PHP since forever, nothing new here. > > > notice should be raised. Th

Re: [PHP-DEV] Changes to constructor signature checks

2011-11-23 Thread Ralph Schindler
Internals: Time to summarize. It is clear to me that internals is divided on this issue. I don't think it's a large enough issue to drag on, even when I disagree with it - both theoretically and in practice. For most OO developer, putting ctors as an abstract or in an interface would not h

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Stas Malyshev
Hi! Unless I'm mistaken it seems that we have a clear and vicious BC break here, the kind of changes that are annoying to catch and does not No, we do not have a BC break here, we have a bugfix here that makes string ops work consistently and only has a problem with completely broken code. I

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Stas Malyshev
Hi! On 11/23/11 6:14 AM, Daniel Convissor wrote: To me, this is the bug. $a['blah'] does not exist. An undefined index If it's a bug, this bug was in PHP since forever, nothing new here. notice should be raised. The key "blah" should not be converted to 0. The following two things should

Re: [PHP-DEV] Changes to constructor signature checks

2011-11-23 Thread Anthony Ferrara
Ralph: >From where I'm sitting, I can see a few sane alternatives (there may be more, but here are the options I can see): Option 1. Remove signature checking from constructors all together. (I don't care for this, but whatever). Additionally, since it's not enforced, perhaps an E_DEPRECATED or

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Etienne Kneuss
Hi, What people seem to have trouble with here is not that $string[0][0] == $string[0], but rather that $string['index'] === $string[0]... But as many people said, it is just how type juggling want: string index? Get me an int => 0. I believe the change introduced in 5.4 makes sense, the previou

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Pierre Joye
On Wed, Nov 23, 2011 at 6:58 PM, Richard Quadling wrote: > Just looking for any test relating to isset() to see what tests will now fail. > > Neither of the isset() tests ext/standard/tests/general_functions look > at arrays with associative indices. > > The behaviour with regard to unavailable a

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Lester Caine
Richard Quadling wrote: I agree with Daniel on this. Just looking for any test relating to isset() to see what tests will now fail. So it's not just me :) I am seeing this break real world projects and can't see a easy way to fix the break. There is nothing really wrong with the current code

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Richard Quadling
On 23 November 2011 15:31, Daniel Convissor wrote: > Hi Again Folks: > > On Wed, Nov 23, 2011 at 09:14:09AM -0500, Daniel Convissor wrote: >> $a = 'foo'; >> echo $a['blah'] . "\n"; >> >> But that second one echos out "f".  This is a huge WTF. > > Two things for the record on this front.  First, i'

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 4:31 PM, Daniel Convissor < dani...@analysisandsolutions.com> wrote: > Hi Again Folks: > > On Wed, Nov 23, 2011 at 09:14:09AM -0500, Daniel Convissor wrote: > > $a = 'foo'; > > echo $a['blah'] . "\n"; > > > > But that second one echos out "f". This is a huge WTF. > > Two t

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Daniel Convissor
Hi Again Folks: On Wed, Nov 23, 2011 at 09:14:09AM -0500, Daniel Convissor wrote: > $a = 'foo'; > echo $a['blah'] . "\n"; > > But that second one echos out "f". This is a huge WTF. Two things for the record on this front. First, i've been actively using PHP for, what, ten years or so, and have

Re: [PHP-DEV] Fw: Bug #60167 [PATCH]: Crash / memory corruption

2011-11-23 Thread Timm Friebe
Hi, Can you add this comment to the bug as well please? And assign to Dmitry, if it is related to the engine then it must be fixed in the engine :) Done. I think COM is at fault, but let's see:) - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.

[PHP-DEV] Thoughts On Implementing Decorator Sugar to core

2011-11-23 Thread Anthony Ferrara
Hello all, I've had an idea that's been burning in my head for a while. Rather than write an RFC or do any significant work on it, I thought I would bounce this off of you all first. Basically, I see a problem with implementing decorators in PHP. To explain the problem, let's say that I have a

Re: [PHP-DEV] Fw: Bug #60167 [PATCH]: Crash / memory corruption

2011-11-23 Thread Pierre Joye
hi Timm! Can you add this comment to the bug as well please? And assign to Dmitry, if it is related to the engine then it must be fixed in the engine :) Cheers, On Wed, Nov 23, 2011 at 4:02 PM, Timm Friebe wrote: > Hey, > > who can review this patch? I'm not sure this is the right place to fix

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 4:04 PM, Daniel Convissor < dani...@analysisandsolutions.com> wrote: > Hi Ferenc: > > [And the manual sys...] > > "Non-integer types are converted to integer." > > So it is a documented behavior, so the current change is just a bugfix > imo. > > Can someone please lend

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Daniel Convissor
Hi Ferenc: [And the manual sys...] > "Non-integer types are converted to integer." > So it is a documented behavior, so the current change is just a bugfix imo. Can someone please lend me their time machine so I can go back and tell folks to just use {} for string offsets and [] for arrays?

[PHP-DEV] Fw: Bug #60167 [PATCH]: Crash / memory corruption

2011-11-23 Thread Timm Friebe
Hey, who can review this patch? I'm not sure this is the right place to fix this issue - it's related to the literal caching in the Zend Engine's method call init opcodes (ZEND_INIT_[STATIC_]METHOD_CALL) and might need to be addressed there instead of having to change PHP extensions. --cut--

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 3:42 PM, Gustavo Lopes wrote: > Em Wed, 23 Nov 2011 14:19:42 -, Ferenc Kovacs > escreveu: > > On Wed, Nov 23, 2011 at 3:14 PM, Daniel Convissor < >> danielc@analysisandsolutions.**com > >> wrote: >> >> > It's actually very simple. Take variable $a which is a string >

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Pierre Joye
On Wed, Nov 23, 2011 at 3:19 PM, Ferenc Kovacs wrote: > if we allow strings to be used as indexes for strings, we have to be > consistent with what we have already. Short notice to avoid confusion: It has nothing to do with allowing string, or double, or whatever else but loosely typing. Loosel

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Gustavo Lopes
Em Wed, 23 Nov 2011 14:19:42 -, Ferenc Kovacs escreveu: On Wed, Nov 23, 2011 at 3:14 PM, Daniel Convissor < dani...@analysisandsolutions.com> wrote: > It's actually very simple. Take variable $a which is a string > ("foo"). Now it you do $a[0] that would produce first letter - "f". > No

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 3:14 PM, Daniel Convissor < dani...@analysisandsolutions.com> wrote: > Hi Stas: > > > It's actually very simple. Take variable $a which is a string > > ("foo"). Now it you do $a[0] that would produce first letter - "f". > > Now here's a tricky part - if you do $a['blah'] it

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Daniel Convissor
Hi Stas: > It's actually very simple. Take variable $a which is a string > ("foo"). Now it you do $a[0] that would produce first letter - "f". > Now here's a tricky part - if you do $a['blah'] it would convert > 'blah' to number, get 0 and return the same letter "f". To me, this is the bug. $a['

Re: [PHP-DEV] Strict session?

2011-11-23 Thread Yasuo Ohgaki
Hi Stats, Thanks to Perrie, I realized I should try to this patch to be accepted for 5.4 branch. As you may already knew, session adoption is "real" threat for PHP applications. Therefore, this patch should be in 5.4.0 for better security. In case of you've missed why session adoption is real th

Re: [PHP-DEV] Strict session?

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 2:53 PM, Yasuo Ohgaki wrote: > 2011/11/23 Hannes Magnusson : > > He has svn account. > > If you login with your svn credentials you'll have full write karma to > > everything on the wiki. > > > > If you don't remember your password; https://master.php.net/forgot.php > > >

Re: [PHP-DEV] Strict session?

2011-11-23 Thread Yasuo Ohgaki
2011/11/23 Hannes Magnusson : > He has svn account. > If you login with your svn credentials you'll have full write karma to > everything on the wiki. > > If you don't remember your password; https://master.php.net/forgot.php > > (your username is yohgaki) Thank you Hannes, I don't know why I cou

Re: [PHP-DEV] pg_escape_literal(), pg_escape_identifier() patch

2011-11-23 Thread Yasuo Ohgaki
Hi Pierre, 2011/11/23 Pierre Joye : > A quick note about that, PHP next is much more the way. Please see the > release RFC for the explanations. Thank you for the pointer. I should better to try add this escape features for 5.4.0. Stats, I think these new escape functions are very useful to Pos

Re: [PHP-DEV] pg_escape_literal(), pg_escape_identifier() patch

2011-11-23 Thread Pierre Joye
hi, On Tue, Nov 22, 2011 at 10:42 PM, Yasuo Ohgaki wrote: > It's nice to have feature for PHP 5.4. It's purely an addition to > pgsql module. Therefore, it has no side effect for existing feature. > 5.4.0 is in RC, but it may be ok for PHP 5.4.1, I guess. A quick note about that, PHP next is mu

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Lester Caine
Ferenc Kovacs wrote: On Wed, Nov 23, 2011 at 10:51 AM, Lester Caine mailto:les...@lsces.co.uk>> wrote: Ferenc Kovacs wrote: some clarification: in the test script, Daniel declared $arr as: $arr = array('exists' => 'foo'); so when he tests $arr['exis

Re: [PHP-DEV] Strict session?

2011-11-23 Thread Hannes Magnusson
He has svn account. If you login with your svn credentials you'll have full write karma to everything on the wiki. If you don't remember your password; https://master.php.net/forgot.php (your username is yohgaki) -Hannes On Wed, Nov 23, 2011 at 02:08, Ferenc Kovacs wrote: > > > On Wed, Nov 23

Re: [PHP-DEV] intl IDNA patch

2011-11-23 Thread Pierre Joye
On Wed, Nov 23, 2011 at 10:26 AM, Stas Malyshev wrote: > I think yes, it's better to have one options set than "options" and "another > options which aren't first options but different options". I don't think > there's breaking of abstraction if we use more options that ICU has, and > probability

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 10:51 AM, Lester Caine wrote: > Ferenc Kovacs wrote: > >> some clarification: >> in the test script, Daniel declared $arr as: >> $arr = array('exists' => 'foo'); >> so when he tests >> $arr['exists']['non_existent'] >> PHP will see that $arr['exists'] is a string, and it w

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Lester Caine
Ferenc Kovacs wrote: some clarification: in the test script, Daniel declared $arr as: $arr = array('exists' => 'foo'); so when he tests $arr['exists']['non_existent'] PHP will see that $arr['exists'] is a string, and it will convert the 'non_existent' index to int(0) and that will return the same

Re: [PHP-DEV] intl IDNA patch

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 10:47 AM, Ferenc Kovacs wrote: > > > On Wed, Nov 23, 2011 at 10:36 AM, Stas Malyshev wrote: > >> Hi! >> >> >> I thought that we already agreed using an output argument for getting >>> the specific error instead of returning either a string or an array. >>> >> >> That's wh

Re: [PHP-DEV] intl IDNA patch

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 10:36 AM, Stas Malyshev wrote: > Hi! > > > I thought that we already agreed using an output argument for getting >> the specific error instead of returning either a string or an array. >> > > That's what I was thinking too, but Gustavo seems to plan to do mixed > return, w

Re: [PHP-DEV] intl IDNA patch

2011-11-23 Thread Stas Malyshev
Hi! I thought that we already agreed using an output argument for getting the specific error instead of returning either a string or an array. That's what I was thinking too, but Gustavo seems to plan to do mixed return, which I think is a worse option. -- Stanislav Malyshev, Software Archit

Re: [PHP-DEV] intl IDNA patch

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 10:26 AM, Stas Malyshev wrote: > Hi! > > Technically, yes, it is possible. But is it desirable? It would require >> breaking the abstraction and looking at the actual values of the flags, >> choosing one of the unused bits (possibly a high one) and hope it'll never >> be u

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Stas Malyshev
Hi! On 11/23/11 12:56 AM, Lester Caine wrote: I'm having a lot of trouble with working out WHAT is going on here at all. It's actually very simple. Take variable $a which is a string ("foo"). Now it you do $a[0] that would produce first letter - "f". Now here's a tricky part - if you do $a[

Re: [PHP-DEV] intl IDNA patch

2011-11-23 Thread Stas Malyshev
Hi! Technically, yes, it is possible. But is it desirable? It would require breaking the abstraction and looking at the actual values of the flags, choosing one of the unused bits (possibly a high one) and hope it'll never be used in future. Plus, in the current patch, the value of the variant c

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Ferenc Kovacs
On Wed, Nov 23, 2011 at 9:56 AM, Lester Caine wrote: > Etienne Kneuss wrote: > >> AFAIK this is one of the change that was explicitly put in to make it >> more consistent. >>> > >>> > But now it breaks code in the wild. I came across this due to an >>> > isset() in PEAR now passing

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Laruence
Hi: I think it is really need make some difference between {} and [] :) thanks On Wed, Nov 23, 2011 at 4:56 PM, Lester Caine wrote: > Etienne Kneuss wrote: AFAIK this is one of the change that was explicitly put in to make it >>  more consistent. >>> >>> > >>> >  But now it brea

Re: [PHP-DEV] intl IDNA patch (was: Re: [PECL-DEV] libidn2 extension for php)

2011-11-23 Thread Gustavo Lopes
On Wed, 23 Nov 2011 07:03:26 -, Stas Malyshev wrote: 1. I'm not sure I understand why we need two options fields. We already have one options field, won't that be enough? We can combine options and space them in a way that old ones work fine with new ones, can't we? And have default v

Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values

2011-11-23 Thread Lester Caine
Etienne Kneuss wrote: AFAIK this is one of the change that was explicitly put in to make it >> more consistent. > > But now it breaks code in the wild. I came across this due to an > isset() in PEAR now passing when it didn't before. PEAR is definitely doing some strange things:) Is it che