Re: [PHP-DEV] Error handling brainstorming

2012-08-03 Thread Stan Vass
if we turn E_STRICT to behave exactly as E_ERROR there is no point keeping the E_STRICT level. personally I disagree with turning something which was a pedantic notice in one version into an unsupported feature which fatals out if you try to use it in the next. maybe E_STRICT->E_DEPRECAT

[PHP-DEV] 回复: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-03 Thread Reeze Xia
在 2012年8月4日星期六,上午6:40,Andrew Faulds 写道: > On 03/08/12 23:36, Etienne Kneuss wrote: > > On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes > (mailto:glo...@nebm.ist.utl.pt)> wrote: > > > https://wiki.php.net/rfc/incompat_ctx > > > > > > An RFC for deprecating and removing $this from incompatible c

[PHP-DEV] [proposal+patch] Addition of ?() as shorthand for isset()

2012-08-03 Thread Andrew Faulds
Hi! I've always thought isset() was quite ugly. For something I use quite frequently for checking the existence of array keys, I feel it is too many keystrokes, and is ugly. So, I decided I would create a shorthand for isset(). One option suggested was a new operator, 'expr ??', which I don'

Re: [PHP-DEV] Error handling brainstorming

2012-08-03 Thread Ferenc Kovacs
On Sat, Aug 4, 2012 at 1:44 AM, Stan Vass wrote: > ** > > > On Sat, Aug 4, 2012 at 1:16 AM, Stan Vass wrote: > >> When I said I'd like to see E_STRICT be fatal/exceptions it wasn't a >> typo. My choice isn't based as much on what the current error severity is, >> or what the error severity is su

Re: [PHP-DEV] Error handling brainstorming

2012-08-03 Thread Stan Vass
On Sat, Aug 4, 2012 at 1:16 AM, Stan Vass wrote: When I said I'd like to see E_STRICT be fatal/exceptions it wasn't a typo. My choice isn't based as much on what the current error severity is, or what the error severity is supposed to represent in general, because I've found in PHP oft

Re: [PHP-DEV] Error handling brainstorming

2012-08-03 Thread Ferenc Kovacs
On Sat, Aug 4, 2012 at 1:16 AM, Stan Vass wrote: > When I said I'd like to see E_STRICT be fatal/exceptions it wasn't a typo. > My choice isn't based as much on what the current error severity is, or > what the error severity is supposed to represent in general, because I've > found in PHP often

Re: [PHP-DEV] Error handling brainstorming

2012-08-03 Thread Stan Vass
When I said I'd like to see E_STRICT be fatal/exceptions it wasn't a typo. My choice isn't based as much on what the current error severity is, or what the error severity is supposed to represent in general, because I've found in PHP often the error severity has no connection with the error that

Re: [PHP-DEV] Error handling brainstorming

2012-08-03 Thread Nikita Popov
On Fri, Aug 3, 2012 at 10:55 PM, Ferenc Kovacs wrote: > Hi, > > We started a discussion about the current error handling mechanism and the > possible improvements in the "Why do disabled functions / classes generate > a WARNING" thread[1], but that is a little bit offtopic there, so I decided > to

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-03 Thread Andrew Faulds
On 03/08/12 23:36, Etienne Kneuss wrote: On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes wrote: https://wiki.php.net/rfc/incompat_ctx An RFC for deprecating and removing $this from incompatible context. Comments are welcome. 4+ years ago Marcus already wanted to clean that up in PHP6. Defini

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-03 Thread Etienne Kneuss
On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes wrote: > https://wiki.php.net/rfc/incompat_ctx > > An RFC for deprecating and removing $this from incompatible context. > > Comments are welcome. 4+ years ago Marcus already wanted to clean that up in PHP6. Definitely +1. Best, > > -- > Gustavo Lop

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-03 Thread Ferenc Kovacs
On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes wrote: > https://wiki.php.net/rfc/**incompat_ctx > > An RFC for deprecating and removing $this from incompatible context. > > Comments are welcome. > > -- > Gustavo Lopes > > -- > PHP Internals - PHP Runtime Deve

[PHP-DEV] Re: Error handling brainstorming

2012-08-03 Thread Ferenc Kovacs
On Fri, Aug 3, 2012 at 11:05 PM, Andrew Faulds wrote: > On 03/08/12 21:55, Ferenc Kovacs wrote: > > Andrew: > From your mails, it seems that you don't agree with Stan on turning > everything but fatals into exceptions[9]. > I'm really confused about that, as if we take away warnings (and by that

[PHP-DEV] Re: Error handling brainstorming

2012-08-03 Thread Andrew Faulds
On 03/08/12 21:55, Ferenc Kovacs wrote: Andrew: From your mails, it seems that you don't agree with Stan on turning everything but fatals into exceptions[9]. I'm really confused about that, as if we take away warnings (and by that logic everything else which is less serious than a warning) the

[PHP-DEV] Error handling brainstorming

2012-08-03 Thread Ferenc Kovacs
Hi, We started a discussion about the current error handling mechanism and the possible improvements in the "Why do disabled functions / classes generate a WARNING" thread[1], but that is a little bit offtopic there, so I decided to create a separate thread for it. Basically Etienne mentioned that

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Laruence
On Sat, Aug 4, 2012 at 12:47 AM, Stas Malyshev wrote: > Hi! > >> I'm looking at a segfault in the SPL caused by the blind creation of a >> class, which seems to only fail when the class is disabled. I'm >> wondering in how many other places this could occur. > > This seems to be pretty bad. I'd sa

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Stas Malyshev
Hi! > I'm looking at a segfault in the SPL caused by the blind creation of a > class, which seems to only fail when the class is disabled. I'm > wondering in how many other places this could occur. This seems to be pretty bad. I'd say creation of an instance of disabled class should be a fatal er

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Stan Vass
Which brings up the issues that I mentioned before. Getting the return of an erroring function isn't such a big issue, but turning everything into exceptions would prevent getting any return value from any function/operation which triggers anything, Maybe you want to keep your cake and eat

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Stan Vass
a php function/operation can raise more than one warning, how would you handle that? with exceptions you would only get the first one. another issue is that with the current error handling model a call can trigger a non-fatal error and still return some data. with exeptions you can't do

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Andrew Faulds
On 03/08/12 17:04, Ferenc Kovacs wrote: Warnings are special, they aren't really errors as such. They wouldn't become exceptions. Also, why should an erroring function return a value? from "My experience shows it's best to have an error handler convert all errors to catchable ex

Re: [PHP-DEV] missing documentation for use-clause in closures?

2012-08-03 Thread Ferenc Kovacs
On Fri, Aug 3, 2012 at 5:53 PM, Ferenc Kovacs wrote: > > > On Fri, Aug 3, 2012 at 5:09 PM, Rasmus Schultz wrote: > >> Is this all the documentation there is for the use-clause for >> anonymous closures? >> >> http://us2.php.net/manual/en/functions.anonymous.php >> >> For one, it would be nice to

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Ferenc Kovacs
> > >> Warnings are special, they aren't really errors as such. They wouldn't > become exceptions. > > Also, why should an erroring function return a value? > > from "My experience shows it's best to have an error handler convert all errors to catchable exceptions, with some error types (like E_ST

Re: [PHP-DEV] missing documentation for use-clause in closures?

2012-08-03 Thread Ferenc Kovacs
On Fri, Aug 3, 2012 at 5:09 PM, Rasmus Schultz wrote: > Is this all the documentation there is for the use-clause for > anonymous closures? > > http://us2.php.net/manual/en/functions.anonymous.php > > For one, it would be nice to have documentation that explains whether > the variables listed in

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Andrew Faulds
On 03/08/12 16:50, Ferenc Kovacs wrote: On Fri, Aug 3, 2012 at 4:19 PM, Stan Vass wrote: Hi all, Can anyone explain to me the reason that when a function or class is disabled via the ini setting, an attempt to access the disabled item generates a non-fatal error? I'm looking at a segfault in

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Ferenc Kovacs
On Fri, Aug 3, 2012 at 4:19 PM, Stan Vass wrote: > Hi all, >> >> Can anyone explain to me the reason that when a function or class is >> disabled via the ini setting, an attempt to access the disabled item >> generates a non-fatal error? >> >> I'm looking at a segfault in the SPL caused by the bl

Re: [PHP-DEV] missing documentation for use-clause in closures?

2012-08-03 Thread Peter Cowburn
On 3 August 2012 16:09, Rasmus Schultz wrote: > Is this all the documentation there is for the use-clause for > anonymous closures? > > http://us2.php.net/manual/en/functions.anonymous.php > > For one, it would be nice to have documentation that explains whether > the variables listed in the use-c

[PHP-DEV] missing documentation for use-clause in closures?

2012-08-03 Thread Rasmus Schultz
Is this all the documentation there is for the use-clause for anonymous closures? http://us2.php.net/manual/en/functions.anonymous.php For one, it would be nice to have documentation that explains whether the variables listed in the use-clause are copied/referenced at declaration-time or at call-

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Laruence
On Fri, Aug 3, 2012 at 3:08 PM, Leigh wrote: > Hi all, > > Can anyone explain to me the reason that when a function or class is > disabled via the ini setting, an attempt to access the disabled item > generates a non-fatal error? > > I'm looking at a segfault in the SPL caused by the blind creatio

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Stan Vass
Hi all, Can anyone explain to me the reason that when a function or class is disabled via the ini setting, an attempt to access the disabled item generates a non-fatal error? I'm looking at a segfault in the SPL caused by the blind creation of a class, which seems to only fail when the class is

Re: [PHP-DEV] Add runkit to PHP Runtime

2012-08-03 Thread Yahav Gindi Bar
On Fri, Aug 3, 2012 at 10:23 AM, Lester Caine wrote: > Yahav Gindi Bar wrote: > >> Maybe I'm wrong when comparing with other languages and mainly with >> ASP.NET(C#) since they've used it for web proposes but I did saw many >> >> classes that used this feature and personally really like it. >> >

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Etienne Kneuss
On Fri, Aug 3, 2012 at 1:59 PM, Leigh wrote: >> Because there isn't anything actually wrong. >> >> A fatal error is reserved for things we cannot recover from, but a >> disabled function is easily recoverable. Another great use-case for engine-thrown exceptions. IMHO we should really rethink the

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Leigh
> Because there isn't anything actually wrong. > > A fatal error is reserved for things we cannot recover from, but a > disabled function is easily recoverable. I don't see how it is any more recoverable than the function/class not existing at all. How much code do you know of that checks for the

Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Hannes Magnusson
On Fri, Aug 3, 2012 at 8:08 AM, Leigh wrote: > Hi all, > > Can anyone explain to me the reason that when a function or class is > disabled via the ini setting, an attempt to access the disabled item > generates a non-fatal error? Because there isn't anything actually wrong. A fatal error is rese

Re: [PHP-DEV] Add runkit to PHP Runtime

2012-08-03 Thread Etienne Kneuss
On Fri, Aug 3, 2012 at 1:03 AM, Sara Golemon wrote: > For my vote: I think keeping this in pecl is fine, because they're all > things which can be done from the extension space. +1 > Yes, I've > abandoned the package, but nothing is stopping someone else from > taking it over. It seems it has a

Re: [PHP-DEV] Add runkit to PHP Runtime

2012-08-03 Thread Lester Caine
Andrew Faulds wrote: Lester, you complain about practically everything being complicated/breaking compatibility/not working with PHP 5.2. Why complain here? It doesn't help the signal:noise ratio to moan about something which has no direct effect on you. When there is no negative responses it i

Re: [PHP-DEV] PHP 5.x Documentend End Of Life Dates

2012-08-03 Thread Ferenc Kovacs
2012.08.03. 11:29, "hakre" ezt írta: > > > Von: Adam Harvey > > > Gesendet: 10:58 Donnerstag, 2.August 2012 > > Betreff: Re: [PHP-DEV] PHP 5.x Documentend End Of Life Dates > > > > On 2 August 2012 16:51, Morgan L. Owens wrote: > >> On 2012-08-02 20:42, Peter Cowburn wrote: > >>> The details o

Re: [PHP-DEV] PHP 5.x Documentend End Of Life Dates

2012-08-03 Thread hakre
> Von: Adam Harvey > Gesendet: 10:58 Donnerstag, 2.August 2012 > Betreff: Re: [PHP-DEV] PHP 5.x Documentend End Of Life Dates > > On 2 August 2012 16:51, Morgan L. Owens wrote: >> On 2012-08-02 20:42, Peter Cowburn wrote: >>> The details on things being "obsoleted" should be in the > migrati

Re: [PHP-DEV] Add runkit to PHP Runtime

2012-08-03 Thread Andrew Faulds
Lester, you complain about practically everything being complicated/breaking compatibility/not working with PHP 5.2. Why complain here? It doesn't help the signal:noise ratio to moan about something which has no direct effect on you. -- Sent from Samsung Mobile Andrew Faulds http://ajf.me/ Les

Re: [PHP-DEV] PHP 5.x Documentend End Of Life Dates

2012-08-03 Thread Lester Caine
Lester Caine wrote: As an update, I've now pushed the remaining changes to /releases to make this "live" (in the sense of being linked from somewhere). I've left it in the sidebar for now, rather than adding it to the blurb on that page. Thanks for that useful crib sheet ... Another useful refe

Re: [PHP-DEV] PHP 5.x Documentend End Of Life Dates

2012-08-03 Thread Lester Caine
Adam Harvey wrote: As an update, I've now pushed the remaining changes to /releases to make this "live" (in the sense of being linked from somewhere). I've left it in the sidebar for now, rather than adding it to the blurb on that page. Thanks for that useful crib sheet ... Another useful refer

Re: [PHP-DEV] Add runkit to PHP Runtime

2012-08-03 Thread Lester Caine
Yahav Gindi Bar wrote: Maybe I'm wrong when comparing with other languages and mainly with ASP.NET(C#) since they've used it for web proposes but I did saw many classes that used this feature and personally really like it. If ASP is so good why is it loosing market share? Personally I'm pulling

[PHP-DEV] Why do disabled functions / classes generate a WARNING.

2012-08-03 Thread Leigh
Hi all, Can anyone explain to me the reason that when a function or class is disabled via the ini setting, an attempt to access the disabled item generates a non-fatal error? I'm looking at a segfault in the SPL caused by the blind creation of a class, which seems to only fail when the class is d