Re: [PHP-DEV] A new php Validator and Filter interface for the SPL

2012-08-31 Thread Laruence
On Fri, Aug 31, 2012 at 11:55 PM, Lars Strojny wrote: > Hi Axel, > > I think PHP core is just not the place for such standardization, as long as > those interface do not interact with the engine (as i.e. Traversable does). > Different frameworks might or might not agree on various interoperabili

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-08-31 Thread Sherif Ramadan
> > That might actually be something I could use :) But the fun for me begins > here: > > $numbers = array(); > $numbers[-1] = 5; > $numbers[] = 6; > > What would have happened to the keys? Normally [] is equivalent to > [count($numbers)]. > This is incorrect, $numbers[] = 6; is not equivalent t

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-08-31 Thread Tjerk Meesters
On 1 Sep, 2012, at 1:11 AM, Rasmus Schultz wrote: > Yes, typo! sorry. > > $array = array(1001, 1002, 1003, 1004); > $number = $array[-1]; // => 1004 > $array[-1] = 1005; > $number = $array[-1]; // => > > Looking at the resulting code, I would like to point out also that >

[PHP-DEV] VCS Account Request: riad

2012-08-31 Thread khan hafizur rahman
developing the php run time -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-08-31 Thread Lester Caine
Ferenc Kovacs wrote: I think it's fine for warnings, notices, and deprecations. Yeah, continuing the execution and still being to handle/log multiple notices is something that wouldn't be possible with exceptions. I think it is a matter of identify where exceptions might be appropriate. On th

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-08-31 Thread Stas Malyshev
Hi! > The spl ext has exceptions all around, so if would count spl as "core", we > have exceptions in the core already, so it would be ok to add more > exceptions where appropriate. SPL is not a part of basic language syntax. There are no SPL keywords and no SPL classes used unless you explicitly

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-08-31 Thread Rasmus Schultz
Yes, typo! sorry. $array = array(1001, 1002, 1003, 1004); $number = $array[-1]; // => 1004 $array[-1] = 1005; $number = $array[-1]; // => Looking at the resulting code, I would like to point out also that it's extremely misleading... because $array[-1] references two comp

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-08-31 Thread Ferenc Kovacs
On Fri, Aug 31, 2012 at 7:03 PM, Anthony Ferrara wrote: > Ferenc, > > >> Not for PHP 5.5 (if that's happening?), but for PHP 6 I think a lot of >> > things should become exceptions. >> >> >> From the impression that I get from reading through the mailing list >> threads and the irc discussions I

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-08-31 Thread Anthony Ferrara
Ferenc, >> Not for PHP 5.5 (if that's happening?), but for PHP 6 I think a lot of > > things should become exceptions. > > > From the impression that I get from reading through the mailing list > threads and the irc discussions I think that there aren't that many things > that could turn into exc

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-08-31 Thread Ferenc Kovacs
On Fri, Aug 31, 2012 at 5:46 PM, Andrew Faulds wrote: > On 31/08/12 13:47, Ferenc Kovacs wrote: > >> It was also mentioned in that thread that we already have a bunch of >> exceptions in spl, and some of the spl features should be in the core (or >> it is already in the core for example IteratorA

Re: [PHP-DEV] A new php Validator and Filter interface for the SPL

2012-08-31 Thread Lars Strojny
Hi Axel, I think PHP core is just not the place for such standardization, as long as those interface do not interact with the engine (as i.e. Traversable does). Different frameworks might or might not agree on various interoperability standards and that’s fine. Having those interfaces in core w

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-08-31 Thread Andrew Faulds
On 31/08/12 13:47, Ferenc Kovacs wrote: It was also mentioned in that thread that we already have a bunch of exceptions in spl, and some of the spl features should be in the core (or it is already in the core for example IteratorAggregate). I personally don't see why SPL is separate from core PHP

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-08-31 Thread Ferenc Kovacs
On Fri, Aug 31, 2012 at 3:14 PM, Rasmus Schultz wrote: > Having thought about this for a while, I think this is a bad idea - here's > why: > > $array = array(1001, 1002, 1003, 1004); > > $number = $array[-1]; // => 1004 > > $number[-1] = 1005; > > $number = $array[-1]; // =>

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-08-31 Thread Rasmus Schultz
Having thought about this for a while, I think this is a bad idea - here's why: $array = array(1001, 1002, 1003, 1004); $number = $array[-1]; // => 1004 $number[-1] = 1005; $number = $array[-1]; // => Obviously, the last statement must return 1005, since otherwise that val

[PHP-DEV] A new php Validator and Filter interface for the SPL

2012-08-31 Thread Axel Etcheverry
Hi, Please take a look at https://github.com/php/php-src/pull/180 This patch is designed to offer two new interfaces in the SPL to standardize filters and validators of frameworks (ZF, SF, etc ...). This allows the developer to use validators and filters of different sources in a same applica

[PHP-DEV] Re: Are exceptions allowed in php core?

2012-08-31 Thread Ferenc Kovacs
On Thu, Feb 24, 2011 at 10:29 AM, Ferenc Kovacs wrote: > Hi. > > it was mentioned multiple times on the list, that exceptions from php core > is prohibited. > do we have some documentation about this? > the more detailed email on this topic was from Lukas: > http://www.mail-archive.com/internals@

[PHP-DEV] Re: [PHP-I18N] Unicode support with UString abstraction layer

2012-08-31 Thread Ferenc Kovacs
On Sun, Jul 22, 2012 at 11:50 PM, Ferenc Kovacs wrote: > > On Wed, Mar 21, 2012 at 7:23 PM, Umberto Salsi wrote: > >> Although I never contributed to the code of the PHP project, I hope the >> ideas >> that follow may provide some suggestion for the future developments of >> the PHP >> language.

Re: Re: [PHP-DEV] [VOTE] Generators

2012-08-31 Thread jpauli
Heh, we face a true problem here, and it's deeper than just "should generators throw exception or not". Adding Derick's notice, -which is true- it becomes "should Core features start throwing Exception knowing we've been fighting to prevent that for years ?". Generator use objects, right ; but as

[PHP-DEV] PHP 5.4.7RC1 released for testing

2012-08-31 Thread David Soria Parra
Hi! We've released PHP 5.4.7RC1 which can be found here: http://downloads.php.net/stas/ Windows binaries as always are at: http://windows.php.net/qa/ This is a regular bugfix release, the full list of issues fixed can be found in the NEWS files. Please test and report if anything is broke