[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

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

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 expr

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 thi

[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" an

[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 ze

[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

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. >

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 \Direc

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

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

[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: 8543604a0f171424c73ccaff506

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 signat

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_MA

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

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", "n

[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, the

[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