Re: [PHP-DEV] bugs.php.net status and plan(s)

2011-06-29 Thread David Zülke
On 28.06.2011, at 23:17, Pierre Joye wrote: > A significant change is that now bugs.php.net is only available via > https://bugs.php.net. May I suggest that the interface doesn't redirect to https:// by default? http:// plays much nicer with proxies, and browsers cache resources to disk, which

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread David Muir
On 30/06/11 15:01, Matt Pelmear wrote: > Not like class_implements(), since that requires processing the returned > array... Rather something that would function similarly to is_subclass_of() > (in that it returns a bool, not an array), but for interfaces. > I seem to run into a need for that on a

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-29 Thread David Zülke
On 29.06.2011, at 01:19, Johannes Schlüter wrote: > On Tue, 2011-06-28 at 23:37 +0100, Arpad Ray wrote: >> - Colours messages according to their response code (success=green, >> client error=yellow, server error=red) > > I would prefer if this would be an ini option (if (cli_web_server.color > &&

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Matt Pelmear
Not like class_implements(), since that requires processing the returned array... Rather something that would function similarly to is_subclass_of() (in that it returns a bool, not an array), but for interfaces. I seem to run into a need for that on a fairly regular basis. (when I first found class

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread David Muir
On 30/06/11 11:13, Matt Pelmear wrote: > Seems odd to me that is_subclass_of returns true for interfaces... I never > realized that before. > > Personally I would prefer a separate method to check for interfaces, since > they aren't really classes (at least in my head), but I suppose that would > b

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Matt Pelmear
Seems odd to me that is_subclass_of returns true for interfaces... I never realized that before. Personally I would prefer a separate method to check for interfaces, since they aren't really classes (at least in my head), but I suppose that would break BC. (I've always wanted a method for checking

Re: [PHP-DEV] Re: bugs.php.net status and plan(s)

2011-06-29 Thread Jérôme Loyet
great news thanks you all ! 2011/6/30 Ferenc Kovacs : > On Wed, Jun 29, 2011 at 11:24 PM, Pierre Joye wrote: >> hi, >> >> Everything is now back to normal, all bugs can be edited, new ones >> have been reindexed to match the old IDs, etc. >> >> Thanks for your patience and thanks Felipe, Tyrael,

Re: [PHP-DEV] Re: bugs.php.net status and plan(s)

2011-06-29 Thread Ferenc Kovacs
On Wed, Jun 29, 2011 at 11:24 PM, Pierre Joye wrote: > hi, > > Everything is now back to normal, all bugs can be edited, new ones > have been reindexed to match the old IDs, etc. > > Thanks for your patience and thanks Felipe, Tyrael, Dan and David for > their efforts. > > Cheers, > also for Hann

Re: [PHP-DEV] unexpected modification of a variable

2011-06-29 Thread Ángel González
Pascal COURTOIS wrote: Hi, Is there any way that a variable can be changed within a function without passing it by reference ? I have a code like that: function myfunction($var) { print_r($var); => prints $var which is an object anotherfunction($var); // call by value print_r(

Re: [PHP-DEV] [PATCH] Small patch for CLI server regarding IPv6 and commandline parsing

2011-06-29 Thread Florian Anderiasch
On 29.06.2011 19:09, Christopher Jones wrote: > Can you log a bug and attach the patch? > > Chris > There you go after bugs is back \o/ https://bugs.php.net/bug.php?id=55073 Greetings, Florian -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/un

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Ralph Schindler
Hey Paul, The only thing we are attempting to do here is make is_subclass_of() more consistent when using class names (strings), something instanceof cannot handle. Given the following: interface A {} class B implements A {} class C extends B {} // currently false, and correct as B is not a

[PHP-DEV] Re: bugs.php.net status and plan(s)

2011-06-29 Thread Pierre Joye
hi, Everything is now back to normal, all bugs can be edited, new ones have been reindexed to match the old IDs, etc. Thanks for your patience and thanks Felipe, Tyrael, Dan and David for their efforts. Cheers, On Tue, Jun 28, 2011 at 11:17 PM, Pierre Joye wrote: > hi, > > As you have noticed

Re: [PHP-DEV] [VOTE] Voting RFC votes closed

2011-06-29 Thread David Soria Parra
On Wed, 2011-06-29 at 11:15 -0400, Sean Coates wrote: > *BUMP* > > It would be really helpful if we could find consensus on this… I feel like > the RFC process is stalled until these questions are answered. I'm not the one who decides this. My personal opinion is that the rules do not apply for

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Anthony Ferrara
> are you kidding, right? var_dump('Foo' instanceof 'Bar'); //Fatal Error: instanceof expects an object instance, constant given On Wed, Jun 29, 2011 at 5:05 PM, Martin Scotta wrote: > On Wed, Jun 29, 2011 at 5:25 PM, Paul Dragoonis wrote: > >> On Wed, Jun 29, 2011 at 9:22 PM, David Zülke >>

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread David Zülke
On 29.06.2011, at 23:05, Martin Scotta wrote: > are you kidding, right? > > $class = 'stdClass'; > $instance = new $class; > var_dump( $instance instanceof $class ); That still only works on instances. Not on class names. Which this dicussion is about. David smime.p7s Description: S/MIME c

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Martin Scotta
On Wed, Jun 29, 2011 at 5:25 PM, Paul Dragoonis wrote: > On Wed, Jun 29, 2011 at 9:22 PM, David Zülke > wrote: > > On 29.06.2011, at 22:20, Paul Dragoonis wrote: > > > >> On Wed, Jun 29, 2011 at 8:49 PM, Ralph Schindler > wrote: > >>> Correct. > >>> > >>> I was hasty in that example, the first

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Benjamin Eberlei
On Wed, 29 Jun 2011 22:22:54 +0200 David Zülke wrote: > On 29.06.2011, at 22:20, Paul Dragoonis wrote: > > > On Wed, Jun 29, 2011 at 8:49 PM, Ralph Schindler > > wrote: > >> Correct. > >> > >> I was hasty in that example, the first was copied & tested (and is > >> reflected > >> in the test,

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Paul Dragoonis
On Wed, Jun 29, 2011 at 9:22 PM, David Zülke wrote: > On 29.06.2011, at 22:20, Paul Dragoonis wrote: > >> On Wed, Jun 29, 2011 at 8:49 PM, Ralph Schindler wrote: >>> Correct. >>> >>> I was hasty in that example, the first was copied & tested (and is reflected >>> in the test, as is that variation

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread David Zülke
On 29.06.2011, at 22:20, Paul Dragoonis wrote: > On Wed, Jun 29, 2011 at 8:49 PM, Ralph Schindler wrote: >> Correct. >> >> I was hasty in that example, the first was copied & tested (and is reflected >> in the test, as is that variation of what I wrote up.) >> >> Either way, test and patch work

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Paul Dragoonis
On Wed, Jun 29, 2011 at 8:49 PM, Ralph Schindler wrote: > Correct. > > I was hasty in that example, the first was copied & tested (and is reflected > in the test, as is that variation of what I wrote up.) > > Either way, test and patch work in 5_3. Doesn't this functionality confuse matters? If

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Ralph Schindler
Correct. I was hasty in that example, the first was copied & tested (and is reflected in the test, as is that variation of what I wrote up.) Either way, test and patch work in 5_3. Thanks, -ralph On 6/29/11 2:42 PM, David Zülke wrote: On 29.06.2011, at 21:39, Ralph Schindler wrote: inte

Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread David Zülke
On 29.06.2011, at 21:39, Ralph Schindler wrote: > interface A {} > class B implements A {} > class C extends B {} > var_dump(is_subclass_of('B', 'A')); // true Typo there; that should be 'C', not 'B'. David smime.p7s Description: S/MIME cryptographic signature

[PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Ralph Schindler
Hi all, Concerning: https://bugs.php.net/bug.php?id=53727 I had put together a quick patch against PHP_5_3 to fix, for what I and others might consider, an issue with is_subclass_of() returning false in this situation: interface A {} class B implements A {} var_dump(is_subclass_of('B',

Re: [PHP-DEV] Inline Lambda Functions

2011-06-29 Thread Anthony Ferrara
Well, we could take python's approach and use a syntax similar to this: array_filter($source, lambda $x: $x < 5); array_map($source, lambda $x, $y: $x < $y); However, I would question the need. Pythonic lambdas cannot contain anything but expressions. Therefore they cannot have any meaningful

Re: [PHP-DEV] [PATCH] Small patch for CLI server regarding IPv6 and commandline parsing

2011-06-29 Thread Christopher Jones
On 06/29/2011 12:30 AM, Florian Anderiasch wrote: Oops, please have a look at the correct diff :) http://pastie.org/2138369 Keep the good ideas coming in! Can you log a bug and attach the patch? Chris -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.

RE: [PHP-DEV] Inline Lambda Functions

2011-06-29 Thread John Crenshaw
> Instead of this. > > array_filter($source, function($x){ return $x < 5; }); > > Being able to do this. (or something like it). > > array_filter($source, $x => $x < 5); This really isn't clear. Deciphering the intent of the code requires looking at all the surrounding stuff, because it

Re: [PHP-DEV] [VOTE] Voting RFC votes closed

2011-06-29 Thread Paul Dragoonis
On Wed, Jun 29, 2011 at 5:20 PM, Pierre Joye wrote: > hi Sean, > > In any case I would do it anyway. > > Whether it can make it to 5.4 or not is another question and I can't > give you an answer. But doing it anyway will finally clear this point. > We have to re do the short array syntax as well.

Re: [PHP-DEV] [VOTE] Voting RFC votes closed

2011-06-29 Thread Pierre Joye
hi Sean, In any case I would do it anyway. Whether it can make it to 5.4 or not is another question and I can't give you an answer. But doing it anyway will finally clear this point. We have to re do the short array syntax as well. >From my side it will be a -1 as I really don't think having jso

Re: [PHP-DEV] unexpected modification of a variable

2011-06-29 Thread Pascal COURTOIS
Le 29/06/2011 17:00, Richard Quadling a écrit : > For objects, $var is always an alias to an object identifier which > points to the same object... > > http://docs.php.net/manual/en/language.oop5.references.php thanks -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, vis

Re: [PHP-DEV] Give the Language a Rest motion (fwd)

2011-06-29 Thread Pierre Joye
On Wed, Jun 29, 2011 at 4:57 PM, Hannes Magnusson wrote: > No. > Some people just wanted some bugsweb so an old database was restored > rather then waiting few hours for the actual data export. The "some people" actually make it so that bugs.php.net was available by the time 5.4.0 was released.

Re: [PHP-DEV] Give the Language a Rest motion (fwd)

2011-06-29 Thread Pierre Joye
On Wed, Jun 29, 2011 at 4:36 PM, Pascal COURTOIS wrote: >  bug 54460 has disapeared from bugs.php.net . Is due to the crash ? Yes, the data was not available by the time we release PHP 5.4.0-alpha1. So we went with an alternative and temporary solution, see http://news.php.net/php.internals/5363

Re: [PHP-DEV] [VOTE] Voting RFC votes closed

2011-06-29 Thread Sean Coates
*BUMP* It would be really helpful if we could find consensus on this… I feel like the RFC process is stalled until these questions are answered. S On 2011-06-27, at 9:06 PM, Sean Coates wrote: >> The RFC was accepted. > > Ok; so is this "official" now, or does it need to be ratified somehow? >

Re: [PHP-DEV] Give the Language a Rest motion (fwd)

2011-06-29 Thread Philip Olson
On Jun 29, 2011, at 7:43 AM, Paul Dragoonis wrote: > On Wed, Jun 29, 2011 at 3:36 PM, Pascal COURTOIS > wrote: >> Le 16/06/2011 08:10, Stas Malyshev a écrit : >>> Hi! >>> what I did every single time. Among all my bug reports I had one answer from decoder-...@own-hero.net (thanks to h

Re: [PHP-DEV] unexpected modification of a variable

2011-06-29 Thread Richard Quadling
On 29 June 2011 15:53, Pascal COURTOIS wrote: > Hi, > > Is there any way that a variable can be changed within a function without > passing it by reference ? > > I have a code like that: > > function myfunction($var) > { > >   >  print_r($var); => prints $var which is an object >  anotherfunction

Re: [PHP-DEV] 5.4 alpha

2011-06-29 Thread Philip Olson
> AFAIK that got into it, but the fixes for the related crashes did not. Nope, not until alpha2... but it's something to look forward to, and it's another reason for people to continue testing future alpha releases. :) Regards, Philip -- PHP Internals - PHP Runtime Development Mailing List To u

Re: [PHP-DEV] Give the Language a Rest motion (fwd)

2011-06-29 Thread Pascal COURTOIS
Le 29/06/2011 16:57, Hannes Magnusson a écrit : > We have the data now and work is now ongoing migrating the two now. > museum is also up, and snaps will probably be running before the weekend. great, thanks :-) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: ht

Re: [PHP-DEV] Give the Language a Rest motion (fwd)

2011-06-29 Thread Hannes Magnusson
On Wed, Jun 29, 2011 at 16:43, Paul Dragoonis wrote: > On Wed, Jun 29, 2011 at 3:36 PM, Pascal COURTOIS > wrote: >> Le 16/06/2011 08:10, Stas Malyshev a écrit : >>> Hi! >>> what I did every single time. Among all my bug reports I had one answer from decoder-...@own-hero.net (thanks to h

[PHP-DEV] unexpected modification of a variable

2011-06-29 Thread Pascal COURTOIS
Hi, Is there any way that a variable can be changed within a function without passing it by reference ? I have a code like that: function myfunction($var) { print_r($var); => prints $var which is an object anotherfunction($var); // call by value print_r($var); => $var has changed

Re: [PHP-DEV] Inline Lambda Functions

2011-06-29 Thread Martin Scotta
Wed, Jun 29, 2011 at 9:36 AM, Jarrod Nettles wrote: > Hi Stefan, > > The point was not about array filtering or LINQ or any of that. It was > about the plausibility of using a shorthand for closures. > > Instead of this. > > array_filter($source, function($x){ return $x < 5; }); > > Being ab

Re: [PHP-DEV] Give the Language a Rest motion (fwd)

2011-06-29 Thread Paul Dragoonis
On Wed, Jun 29, 2011 at 3:36 PM, Pascal COURTOIS wrote: > Le 16/06/2011 08:10, Stas Malyshev a écrit : >> Hi! >> >>> what I did every single time. Among all my bug reports I had one >>> answer from decoder-...@own-hero.net (thanks to him) who reduced >>> the test case for a memory leak (bug 54460)

Re: [PHP-DEV] Give the Language a Rest motion (fwd)

2011-06-29 Thread Pascal COURTOIS
Le 16/06/2011 08:10, Stas Malyshev a écrit : > Hi! > >> what I did every single time. Among all my bug reports I had one >> answer from decoder-...@own-hero.net (thanks to him) who reduced >> the test case for a memory leak (bug 54460). I'm not talking about >> bugs in modules but bugs in *core* w

Re: [PHP-DEV] SplClassLoader

2011-06-29 Thread Mike Willbanks
> > There's a RFC covering this. There's a patch also. > > https://wiki.php.net/rfc/splclassloader This one seems to have fallen through the cracks? I know this would benefit many of the frameworks that are out there and give a speed bump to people utilizing them. Is this a possibility for 5.4?

Re: [PHP-DEV] Inline Lambda Functions

2011-06-29 Thread Jarrod Nettles
Hi Stefan, The point was not about array filtering or LINQ or any of that. It was about the plausibility of using a shorthand for closures. Instead of this. array_filter($source, function($x){ return $x < 5; }); Being able to do this. (or something like it). array_filter($source, $x =

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-29 Thread Pierre Joye
hi, Good idea :) However I would prefer to have that enabled optionally. CLI is widely used for automated tasks with logs created using std* redirects. I would not like to have the color escape codes in these logs. Also please open a FR at bugs.php.net and attach the patch(es) to it, thanks! Ch

Re: [PHP-DEV] 5.4 alpha

2011-06-29 Thread Ferenc Kovacs
On Wed, Jun 29, 2011 at 12:41 PM, Derick Rethans wrote: > On Tue, 28 Jun 2011, Stas Malyshev wrote: > >> On 6/28/11 11:35 AM, Ferenc Kovacs wrote: >> > wasn't the alpha1 packaged in the last second? >> > it was packaged on Jun 19, and it was planned to be released on Jun 20. >> > and it did includ

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-29 Thread Johannes Schlüter
On Wed, 2011-06-29 at 11:45 +0100, Derick Rethans wrote: > That's why the patch first checks whether stdout is actually a tty, so > your log file will not have ansi control characters. While that check is not always the best/good thing. For instance if you're using script(1) to log a terminal ses

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-29 Thread Derick Rethans
On Wed, 29 Jun 2011, Jérôme Loyet wrote: > 2011/6/29 Johannes Schlüter : > > On Tue, 2011-06-28 at 23:37 +0100, Arpad Ray wrote: > >> - Colours messages according to their response code (success=green, > >> client error=yellow, server error=red) > > > > I would prefer if this would be an ini optio

Re: [PHP-DEV] 5.4 alpha

2011-06-29 Thread Derick Rethans
On Tue, 28 Jun 2011, Stas Malyshev wrote: > On 6/28/11 11:35 AM, Ferenc Kovacs wrote: > > wasn't the alpha1 packaged in the last second? > > it was packaged on Jun 19, and it was planned to be released on Jun 20. > > and it did include obvious bugs. > > No, it was not. It was checked, ensured it

Re: [PHP-DEV] [PATCH] Small patch for CLI server regarding IPv6 and commandline parsing

2011-06-29 Thread Florian Anderiasch
Oops, please have a look at the correct diff :) http://pastie.org/2138369 --- sapi/cli/php_cli_server.c.old 2011-06-29 09:08:28.971479778 +0200 +++ sapi/cli/php_cli_server.c 2011-06-28 19:43:23.123167815 +0200 @@ -1799,13 +1799,28 @@ } { - char *p = strchr(h

[PHP-DEV] [PATCH] Small patch for CLI server regarding IPv6 and commandline parsing

2011-06-29 Thread Florian Anderiasch
Hi all, as of yesterday the CLI server didn't seemed to listen to addr:port in format like [::1]:3000, so here's a patch. Feedback very welcome. Greetings, Florian See http://pastie.org/2138304 or this: --- php_cli_server.c.orig 2011-06-28 19:43:23.123167815 +0200 +++ php_cli_server.c