[PHP-DEV] Re: Bug #50816

2011-07-28 Thread Pierrick Charron
Hi again,

#50816 is due to the fact that the function
zend_hash_update_current_key_ex try to determinate if an element of
the array is before/after an other one with the new key by looking at
their position in the Bucket. The problem is that the key of the
element we want to change is not the same as the other one which mean
they're not always in the same Bucket (almost never).

The only solution I found was to determine which element is first by
looping into the array itself element per element. I tried to optimise
the patch by first making sure the second element exists so that I
don't loop on the array for nothing.

The "optimised" patch can be found here : http://www.adoy.net/php/50816-2.diff

If someone has a better solution I'll be please to read it.

Thanks
Pierrick



On 28 July 2011 20:57, Pierrick Charron  wrote:
> Hi,
>
> I added a patch on #50816. I'm not sure the approach to fix this bug
> is the best one so if someone can give me some feedback ?
>
> Thanks
> Pierrick
>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] [Bug #55311] Static methods invoke __call when called from within class

2011-07-28 Thread Laruence
Hi:
 about #55311.https://bugs.php.net/bug.php?id=55311

 I found it maybe for some reason, that somebody change the
if/elseif sequence to make this bug.

 but I am not sure about why he do this,  so I refer to maillist,  any idea?

Index: Zend/zend_object_handlers.c
===
--- Zend/zend_object_handlers.c (revision 313905)
+++ Zend/zend_object_handlers.c (working copy)
@@ -988,13 +988,13 @@
if (!fbc && zend_hash_find(&ce->function_table, lc_function_name,
function_name_strlen+1, (void **) &fbc)==FAILURE) {
efree(lc_function_name);

-   if (ce->__call &&
+   if (ce->__callstatic) {
+   return zend_get_user_callstatic_function(ce, 
function_name_strval,
function_name_strlen);
+   } else if (ce->__call &&
EG(This) &&
Z_OBJ_HT_P(EG(This))->get_class_entry &&
instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
return zend_get_user_call_function(ce, 
function_name_strval,
function_name_strlen);
-   } else if (ce->__callstatic) {
-   return zend_get_user_callstatic_function(ce, 
function_name_strval,
function_name_strlen);
} else {
return NULL;
}
-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] parsing break and continue statements

2011-07-28 Thread Kiyoto Tamura
Hi Johannes,

Thanks for your reply :) What I meant was that why does the parser
still accept any expression after T_BREAK/CONTINUE and defer the error
check to zend_do_brk_cont? Isn't it clearer to only accept if the
expression following T_BREAK/CONTINUE is a positive integer (if there
is any expression at all)?

Kiyoto

2011/7/28 Johannes Schlüter :
> On Thu, 2011-07-28 at 16:10 -0700, Kiyoto Tamura wrote:
>> Hi,
>>
>> I am new to the PHP internals, and I was just looking through the code
>> related to parsing break/continue statements. It looks that as of PHP
>> 5.4, Zend/zend_language_parser.y accepts both "T_BREAK expr" and
>> "T_CONTINUE expr" and check to make sure "expr" is a positive integer
>> in the function zend_do_brk_cont. Doesn't it make more sense to
>> replace "T_BREAK expr" with  "T_BREAK " (the same
>> goes for the continue statement)?
>
> T_BREAK expr  allows things like
>
>   $foo = rand(...);
>   break $foo;
>
> but we've dropped that for performance reasons in 5.4.
>
> johannes
>
>> Thanks in advance!
>>
>> kiyoto
>>
>
>
>

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [RFC]strn(case)cmp supporting negative length as third parameter

2011-07-28 Thread Laruence
Hi:
  first of all, yes , you are right about the reverse order thing:

 and then, they are not equal:

 

will output:
  strncmp:
  int(5)
  int(5)
  int(0)
  int(0)


thanks

2011/7/29 Ángel González :
> Laruence wrote:
>>
>> Hi:
>>
>>   strn(case)cmp dosen't  support a negative length as its third
>> paramter,  while substr dose.
>
>>  here is the rfc: https://wiki.php.net/rfc/strncmpnegativelen
>>
>>  any question? plz worte me back.
>>
>>  thanks
>
> What do you exactly mean by "in the reverse order" in
>>
>> if the abs of the negative length is greater than any strlen of the first
>> two parameters, then strn(case)cmp will work as strncmp in the reverse order
>> with the abs value:
>
> Looking at
>>
>> var_dump  (strncmp
>>  ("prefix_num",  "num",  -10));
>>   //outpu: int(7)
>
> it seems to mean that it would be equivalent to
>>
>> var_dump(strncmp("mun_xiferp", "mun", 10));
>
> However, if I'm reading the patch correctly, it would
> be taking the smaller string. Ie. it would be equivalent
> to
>
>> var_dump  (strncmp
>>  ("prefix_num",  "num",  -3));
>
> Seems an implementation bug.
>
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Bug #50816

2011-07-28 Thread Pierrick Charron
Hi,

I added a patch on #50816. I'm not sure the approach to fix this bug
is the best one so if someone can give me some feedback ?

Thanks
Pierrick

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] parsing break and continue statements

2011-07-28 Thread Johannes Schlüter
On Thu, 2011-07-28 at 16:10 -0700, Kiyoto Tamura wrote:
> Hi,
> 
> I am new to the PHP internals, and I was just looking through the code
> related to parsing break/continue statements. It looks that as of PHP
> 5.4, Zend/zend_language_parser.y accepts both "T_BREAK expr" and
> "T_CONTINUE expr" and check to make sure "expr" is a positive integer
> in the function zend_do_brk_cont. Doesn't it make more sense to
> replace "T_BREAK expr" with  "T_BREAK " (the same
> goes for the continue statement)?

T_BREAK expr  allows things like

   $foo = rand(...);
   break $foo;

but we've dropped that for performance reasons in 5.4.

johannes

> Thanks in advance!
> 
> kiyoto
> 



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] parsing break and continue statements

2011-07-28 Thread Kiyoto Tamura
Hi,

I am new to the PHP internals, and I was just looking through the code
related to parsing break/continue statements. It looks that as of PHP
5.4, Zend/zend_language_parser.y accepts both "T_BREAK expr" and
"T_CONTINUE expr" and check to make sure "expr" is a positive integer
in the function zend_do_brk_cont. Doesn't it make more sense to
replace "T_BREAK expr" with  "T_BREAK " (the same
goes for the continue statement)?

Thanks in advance!

kiyoto

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] [PATCH] Add SORT_NATURAL and SORT_CASE support to array_multisort

2011-07-28 Thread Arpad Ray
Hi,

https://bugs.php.net/patch-display.php?bug_id=55158&patch=trunk-multisort-natural&revision=latest
adds the flags SORT_NATURAL and SORT_CASE to array_multisort. The
SORT_NATURAL flag is well explained by the request the patch is
attached to: https://bugs.php.net/bug.php?id=55158

SORT_CASE can be combined with SORT_STRING or SORT_NATURAL for a
case-insensitive sort.

I think it's a useful feature with no BC issues, and I'd appreciate
any feedback.

Regards,

Arpad

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Exception throwed if parent::__construct() not called in \DirectoryIterator subclass

2011-07-28 Thread Richard Quadling
On 28 July 2011 20:36, John Crenshaw  wrote:
>
>
> 2011/7/28 Frédéric Hardy :
>> Hello !
>>
>> In PHP 5.4 alpha, an exception is throwing if a subclass of
>> \DirectoryIterator not called the parent constructor.
>> Moreover, this exception can not be catched in the constructor of the
>> subclass.
>> This behavious seems to be a good idea, because \DirectoryIterator may be in
>> an inconsistant state if the parent constructor is not called.
>> But i think that it's not a good idea, because it's a BC break.
>> It's not the case in 5.3 and i have unit test cases which fail by this new
>> behavior, because moked \DirectoryIterator class does not call the parent
>> constructor.
>> In context of unit test, the fact that \DirectoryIterator is inconsistant
>> may be not a problem and can be the desired behavior.
>
> I strongly agree. Throwing an exception ONLY because the parent constructor 
> wasn't called is a serious departure from expectations. It is fine for other 
> code in the parent class to fail later due to incomplete/improper 
> initialization which may likely be caused by failure to call the parent 
> constructor earlier, (In fact, that is even expected in many cases) but I 
> cannot conceive of any acceptable reason for the error described here. Even 
> though the change was certainly well intentioned, it clearly didn't account 
> for the possibility of unusual but valid coding situations (such as mocks and 
> other code generation tactics that should be able to reasonably depend on 
> consistent language behaviors).

If the constructor MUST be called, then it would seem that you must
not be allowed to extend it and instead, have another method which you
must use.

Badly, beforeConstruct() and/or afterConstruct(), but then we are
moving to AOP (which would be nice).

Enforcement of the constructor can only be achieved by making it final.
-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DEV] Exception throwed if parent::__construct() not called in \DirectoryIterator subclass

2011-07-28 Thread John Crenshaw


2011/7/28 Frédéric Hardy :
> Hello !
>
> In PHP 5.4 alpha, an exception is throwing if a subclass of
> \DirectoryIterator not called the parent constructor.
> Moreover, this exception can not be catched in the constructor of the
> subclass.
> This behavious seems to be a good idea, because \DirectoryIterator may be in
> an inconsistant state if the parent constructor is not called.
> But i think that it's not a good idea, because it's a BC break.
> It's not the case in 5.3 and i have unit test cases which fail by this new
> behavior, because moked \DirectoryIterator class does not call the parent
> constructor.
> In context of unit test, the fact that \DirectoryIterator is inconsistant
> may be not a problem and can be the desired behavior.

I strongly agree. Throwing an exception ONLY because the parent constructor 
wasn't called is a serious departure from expectations. It is fine for other 
code in the parent class to fail later due to incomplete/improper 
initialization which may likely be caused by failure to call the parent 
constructor earlier, (In fact, that is even expected in many cases) but I 
cannot conceive of any acceptable reason for the error described here. Even 
though the change was certainly well intentioned, it clearly didn't account for 
the possibility of unusual but valid coding situations (such as mocks and other 
code generation tactics that should be able to reasonably depend on consistent 
language behaviors).

John Crenshaw
Priacta, Inc.


Re: [PHP-DEV] Exception throwed if parent::__construct() not called in \DirectoryIterator subclass

2011-07-28 Thread Etienne Kneuss
Hello,

2011/7/28 Frédéric Hardy :
> Hello !
>
> In PHP 5.4 alpha, an exception is throwing if a subclass of
> \DirectoryIterator not called the parent constructor.
> Moreover, this exception can not be catched in the constructor of the
> subclass.
> This behavious seems to be a good idea, because \DirectoryIterator may be in
> an inconsistant state if the parent constructor is not called.
> But i think that it's not a good idea, because it's a BC break.
> It's not the case in 5.3 and i have unit test cases which fail by this new
> behavior, because moked \DirectoryIterator class does not call the parent
> constructor.
> In context of unit test, the fact that \DirectoryIterator is inconsistant
> may be not a problem and can be the desired behavior.

We have two ways internally of execute code that needs to be executed
as soon as we instantiate the object:

1) In the constructor
2) In the handler managing instantiation.

Doing it in (1) is problematic as PHP gives no implicit guarantee that
it will be called. Doing it in (2) is also problematic as it makes the
class "magic", by putting code with effects in a place where it
doesn't belong.
>From a design perspective it is better to execute such code in the
constructor, especially if it takes argument, so (1) is "more correct"
than (2).

Now, as I said, PHP does not force you to call the parent constructor.
In almost every cases, not calling the overridden constructor is bad
practice and yields inconsistent results.
For internal classes, skipping code that often do mostly
initialization is dangerous and leads to crashes.

Now, for the issue at hand:
Even though it is a BC break, I believe that it is a very small one
and that it should be seen as a bug fix.
Note that the restriction is only here if the user tries to do
something terribly wrong.

IMO, it should remain impossible to extend DirectoryIterator's
__construct without calling the parent construct.

Best,

>
> There is a bug report : https://bugs.php.net/bug.php?id=55300
>
> Best regards,
> Fred
> --
>
> 
> Frédéric Hardy : Architecte d'application/Admin. système/Ergonome
>           CV : http://blog.mageekbox.net/public/cv.frederic.hardy.pdf
>         Blog : http://blog.mageekbox.net
>      Twitter : http://twitter.com/mageekguy
> 
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Etienne Kneuss
http://www.colder.ch

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [RFC]strn(case)cmp supporting negative length as third parameter

2011-07-28 Thread Ángel González

Laruence wrote:

Hi:

   strn(case)cmp dosen't  support a negative length as its third
paramter,  while substr dose.



  here is the rfc: https://wiki.php.net/rfc/strncmpnegativelen

  any question? plz worte me back.

  thanks


What do you exactly mean by "in the reverse order" in
if the abs of the negative length is greater than any strlen of the 
first two parameters, then strn(case)cmp will work as strncmp in the 
reverse order with the abs value: 


Looking at

var_dump  (strncmp  
("prefix_num",  "num",  -10));
   //outpu: int(7)

it seems to mean that it would be equivalent to

var_dump(strncmp("mun_xiferp", "mun", 10));


However, if I'm reading the patch correctly, it would
be taking the smaller string. Ie. it would be equivalent
to


var_dump  (strncmp  
("prefix_num",  "num",  -3));


Seems an implementation bug.



[PHP-DEV] PHP 5.3.7RC4 Released for Testing

2011-07-28 Thread Ilia Alshanetsky
The fourth and hopefully final release candidate of 5.3.7 was just
released for testing and can be downloaded here:

https://downloads.php.net/ilia/php-5.3.7RC4.tar.bz2 (md5sum:
143ae4c3c5df93e2a9efae532cb51790)
https://downloads.php.net/ilia/php-5.3.7RC4.tar.gz (md5sum:
8543604a0f171424c73ccaff5061f7ba)

The Windows binaries are available at: http://windows.php.net/qa/

There were a few important fixes made since RC3 and this new RC is
designed to validate that these fixes have not introduced any
regressions.
The intent is that this is the final release candidate before the
final release, which if all goes well will follow in 2 weeks. PHP
5.3.7 is focused on
improving the stability and security. To ensure that the release is
solid, please test this RC against your code base and report any
problems that you encounter.

To find out what was changed since the last release please refer to
the NEWS file found within the archive or on
http://svn.php.net/viewvc/php/php-src/tags/php_5_3_7RC4/NEWS?revision=HEAD&view=markup

Windows users please mind that we don't provide VS6 builds anymore
since PHP 5.3.6.

Ilia Alshanetsky

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [RFC]strn(case)cmp supporting negative length as third parameter

2011-07-28 Thread Laruence
Hi:
   As Derick and Pierre  said(in IRC),  I change the patch base from
PHP 5.3 to PHP5.4,

  and avoid changing ZEND_API declaration.

  RFC updated

  new patch : 
http://www.laruence.com/php-dev/php-5.4-trunk-strncmp-supproting-negative-len.patch

  thanks


2011/7/28 Pierre Joye :
> the signature is not the same anymore, some extension may not build
> anymore (depending on the compiler used and its flag).
>
> Cheers,
>
> On Thu, Jul 28, 2011 at 1:32 PM, Laruence  wrote:
>> Hi:
>>
>> why?
>>
>> I think this change would not cause any other side-effects.
>>
>> and if you are worry about INT_MAX,  I think it's ok to declare with
>> long(in fact, I already did so).
>>
>> thanks
>>
>> 2011/7/28 Derick Rethans :
>>> On Thu, 28 Jul 2011, Laruence wrote:
>>>
 Hi:

   strn(case)cmp dosen't  support a negative length as its third
 paramter,  while substr dose.

  I wrote a patch to make strn(case)cmp supporting negative length,
 make following script works as expect:

     >>>    if (strncmp("prefix_num", "num", -3) === 0) {
         echo "they have same suffix\n";
    }
   ?>

  here is the rfc: https://wiki.php.net/rfc/strncmpnegativelen
>>>
>>> - You're changing binary API of some API functions, so this can't go
>>>  into PHP 5.3:
>>>
>>>        -ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const 
>>> char *s2, uint len2, uint length);
>>>        +ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const 
>>> char *s2, uint len2, int length);
>>>
>>> cheers,
>>> Derick
>>>
>>> --
>>> http://derickrethans.nl | http://xdebug.org
>>> Like Xdebug? Consider a donation: http://xdebug.org/donate.php
>>> twitter: @derickr and @xdebug
>>>
>>
>>
>>
>> --
>> Laruence  Xinchen Hui
>> http://www.laruence.com/
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [RFC]strn(case)cmp supporting negative length as third parameter

2011-07-28 Thread Pierre Joye
the signature is not the same anymore, some extension may not build
anymore (depending on the compiler used and its flag).

Cheers,

On Thu, Jul 28, 2011 at 1:32 PM, Laruence  wrote:
> Hi:
>
> why?
>
> I think this change would not cause any other side-effects.
>
> and if you are worry about INT_MAX,  I think it's ok to declare with
> long(in fact, I already did so).
>
> thanks
>
> 2011/7/28 Derick Rethans :
>> On Thu, 28 Jul 2011, Laruence wrote:
>>
>>> Hi:
>>>
>>>   strn(case)cmp dosen't  support a negative length as its third
>>> paramter,  while substr dose.
>>>
>>>  I wrote a patch to make strn(case)cmp supporting negative length,
>>> make following script works as expect:
>>>
>>>     >>    if (strncmp("prefix_num", "num", -3) === 0) {
>>>         echo "they have same suffix\n";
>>>    }
>>>   ?>
>>>
>>>  here is the rfc: https://wiki.php.net/rfc/strncmpnegativelen
>>
>> - You're changing binary API of some API functions, so this can't go
>>  into PHP 5.3:
>>
>>        -ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const 
>> char *s2, uint len2, uint length);
>>        +ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const 
>> char *s2, uint len2, int length);
>>
>> cheers,
>> Derick
>>
>> --
>> http://derickrethans.nl | http://xdebug.org
>> Like Xdebug? Consider a donation: http://xdebug.org/donate.php
>> twitter: @derickr and @xdebug
>>
>
>
>
> --
> Laruence  Xinchen Hui
> http://www.laruence.com/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [RFC]strn(case)cmp supporting negative length as third parameter

2011-07-28 Thread Laruence
Hi:

why?

I think this change would not cause any other side-effects.

and if you are worry about INT_MAX,  I think it's ok to declare with
long(in fact, I already did so).

thanks

2011/7/28 Derick Rethans :
> On Thu, 28 Jul 2011, Laruence wrote:
>
>> Hi:
>>
>>   strn(case)cmp dosen't  support a negative length as its third
>> paramter,  while substr dose.
>>
>>  I wrote a patch to make strn(case)cmp supporting negative length,
>> make following script works as expect:
>>
>>     >    if (strncmp("prefix_num", "num", -3) === 0) {
>>         echo "they have same suffix\n";
>>    }
>>   ?>
>>
>>  here is the rfc: https://wiki.php.net/rfc/strncmpnegativelen
>
> - You're changing binary API of some API functions, so this can't go
>  into PHP 5.3:
>
>        -ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const 
> char *s2, uint len2, uint length);
>        +ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const 
> char *s2, uint len2, int length);
>
> cheers,
> Derick
>
> --
> http://derickrethans.nl | http://xdebug.org
> Like Xdebug? Consider a donation: http://xdebug.org/donate.php
> twitter: @derickr and @xdebug
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [RFC]strn(case)cmp supporting negative length as third parameter

2011-07-28 Thread Derick Rethans
On Thu, 28 Jul 2011, Laruence wrote:

> Hi:
> 
>   strn(case)cmp dosen't  support a negative length as its third
> paramter,  while substr dose.
> 
>  I wrote a patch to make strn(case)cmp supporting negative length,
> make following script works as expect:
> 
> if (strncmp("prefix_num", "num", -3) === 0) {
> echo "they have same suffix\n";
>}
>   ?>
> 
>  here is the rfc: https://wiki.php.net/rfc/strncmpnegativelen

- You're changing binary API of some API functions, so this can't go 
  into PHP 5.3:

-ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const char 
*s2, uint len2, uint length);
+ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const char 
*s2, uint len2, int length);

cheers,
Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] 5.4 and safemode

2011-07-28 Thread Keloran
I noticed that in revision
*313784
 *it is checking for safemode/open basedir, but isn't safemode being dropped
from 5.4 (if going by the RFC), since it was deprecated in 5.3 ?, unless im
reading that wrong, or if not dropped, then wouldn't this check be moot
anyway by having the main feature deprecated

just a wonder


[PHP-DEV] Exception throwed if parent::__construct() not called in \DirectoryIterator subclass

2011-07-28 Thread Frédéric Hardy

Hello !

In PHP 5.4 alpha, an exception is throwing if a subclass of 
\DirectoryIterator not called the parent constructor.
Moreover, this exception can not be catched in the constructor of the 
subclass.
This behavious seems to be a good idea, because \DirectoryIterator may 
be in an inconsistant state if the parent constructor is not called.

But i think that it's not a good idea, because it's a BC break.
It's not the case in 5.3 and i have unit test cases which fail by this 
new behavior, because moked \DirectoryIterator class does not call the 
parent constructor.
In context of unit test, the fact that \DirectoryIterator is 
inconsistant may be not a problem and can be the desired behavior.


There is a bug report : https://bugs.php.net/bug.php?id=55300

Best regards,
Fred
--


Frédéric Hardy : Architecte d'application/Admin. système/Ergonome
   CV : http://blog.mageekbox.net/public/cv.frederic.hardy.pdf
 Blog : http://blog.mageekbox.net
  Twitter : http://twitter.com/mageekguy



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php