Re: [PHP-DEV] 6.0 And Moving Forward

2012-07-14 Thread Pierre Joye
hi, On Sat, Jul 14, 2012 at 8:14 AM, Sherif Ramadan wrote: > I'd like to address the most obvious issues I see with moving on to PHP 6. > > First, there has already been a lot of discussion on PHP 6 since as > early as 2007, if I recall correctly. Albeit, a lot of this has died > down over the ye

Re: [PHP-DEV] 6.0 And Moving Forward

2012-07-14 Thread Lester Caine
Sherif Ramadan wrote: I propose choosing a different version naming for the next branch. Perhaps we can skip 6 since it got nowhere and move right to 7. I'm sure that's superficial right now, but will be important for the sake of not confusing anyone that may have read or heard about what PHP 6 w

Re: [PHP-DEV] Re: array_last_key() function

2012-07-14 Thread Paul Dragoonis
On Sat, Jul 14, 2012 at 3:04 AM, Anthony Ferrara wrote: > Stas, > >> I like this idea. array_first_key would be nice too >> >> I am probably missing something, but what those would allow to do that >> rewind/end+key() doesn't do? >> > > The big thing that it does that end()+key() doesn't do is rea

RE: [PHP-DEV] 6.0 And Moving Forward

2012-07-14 Thread Clint Priest
+1 :) > -Original Message- > From: Kris Craig [mailto:kris.cr...@gmail.com] > Sent: Friday, July 13, 2012 11:47 AM > To: Anthony Ferrara > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] 6.0 And Moving Forward > > > > > > > 4. Rewrite the entire parser completely. I keep hearing abou

Re: [PHP-DEV] Re: array_last_key() function

2012-07-14 Thread John LeSueur
On Sat, Jul 14, 2012 at 4:34 AM, Paul Dragoonis wrote: > On Sat, Jul 14, 2012 at 3:04 AM, Anthony Ferrara > wrote: > > Stas, > > > >> I like this idea. array_first_key would be nice too > >> > >> I am probably missing something, but what those would allow to do that > >> rewind/end+key() doesn't

Re: [PHP-DEV] Re: array_last_key() function

2012-07-14 Thread Paul Dragoonis
(forgot to CC internals on the previous email) On Sat, Jul 14, 2012 at 4:42 PM, John LeSueur wrote: > Readability is solved by creating a userland function: > > function array_last_key(&$array) > { > return key(array_slice($array, -1,1,true)); > } Another userland function, with a by-ref par

Re: [PHP-DEV] Re: array_last_key() function

2012-07-14 Thread Gustavo Lopes
Em Sat, 14 Jul 2012 04:04:27 +0200, Anthony Ferrara escreveu: I like this idea. array_first_key would be nice too I am probably missing something, but what those would allow to do that rewind/end+key() doesn't do? The big thing that it does that end()+key() doesn't do is really what it do

Re: [PHP-DEV] Re: array_last_key() function

2012-07-14 Thread Anthony Ferrara
Gustavo, Why is the last key special? Why not a function to get the first or the > penultimate key? > How would such a function look? > Of course, there is one aspect where the first and last keys are special > -- if you have some algorithm where you pop or shift the array > successively. But i

Re: [PHP-DEV] Re: array_last_key() function

2012-07-14 Thread Rasmus Lerdorf
On 07/14/2012 10:13 AM, Anthony Ferrara wrote: > Gustavo, > > Why is the last key special? Why not a function to get the first or the >> penultimate key? >> > > How would such a function look? I think the function would look just like the function we have for doing this. key(array_slice($arr,-2

Re: [PHP-DEV] Re: array_last_key() function

2012-07-14 Thread Gustavo Lopes
Em Sat, 14 Jul 2012 19:13:32 +0200, Anthony Ferrara escreveu: Why is the last key special? Why not a function to get the first or the penultimate key? How would such a function look? I think you've misread my statement. I was not suggesting a function that would get an arbitrary key.

Re: [PHP-DEV] Re: array_last_key() function

2012-07-14 Thread Rasmus Lerdorf
On 07/14/2012 10:29 AM, Rasmus Lerdorf wrote: > On 07/14/2012 10:13 AM, Anthony Ferrara wrote: >> Gustavo, >> >> Why is the last key special? Why not a function to get the first or the >>> penultimate key? >>> >> >> How would such a function look? > > I think the function would look just like the

[PHP-DEV] [proposal + pull request] Replace logo GUIDs with data URIs

2012-07-14 Thread Andrew Faulds
Hi there, This is a patch that replaces PHP's infamous logo GUIDs with data URIs instead, and also embed PHP credits in the phpinfo() page, hidden using JavaScript (but gracefully degrading), to eliminate these GUIDs altogether. :) https://github.com/php/php-src/pull/132 -- Andrew Faulds (AJF)

[PHP-DEV] Recommended way to create a zval that serves as a callback in an extension

2012-07-14 Thread Adam Jon Richardson
Hi, I'm calling the function php_pcre_replace() in my extension: http://lxr.php.net/xref/PHP_5_4/ext/pcre/php_pcre.c#952 I would like to use a callback for the replace_val, but this will be supplied by my extension. I'm wondering what the recommended way of creating the replace_val zval callback

Re: [PHP-DEV] [proposal + pull request] Replace logo GUIDs with data URIs

2012-07-14 Thread Rasmus Lerdorf
On 07/14/2012 01:49 PM, Andrew Faulds wrote: > Hi there, > > This is a patch that replaces PHP's infamous logo GUIDs with data URIs > instead, and also embed PHP credits in the phpinfo() page, hidden > using JavaScript (but gracefully degrading), to eliminate these GUIDs > altogether. > > :) > >

Re: [PHP-DEV] [proposal + pull request] Replace logo GUIDs with data URIs

2012-07-14 Thread Hannes Magnusson
On Sat, Jul 14, 2012 at 9:49 PM, Andrew Faulds wrote: > Hi there, > > This is a patch that replaces PHP's infamous logo GUIDs with data URIs > instead, and also embed PHP credits in the phpinfo() page, hidden > using JavaScript (but gracefully degrading), to eliminate these GUIDs > altogether. > >

Re: [PHP-DEV] [proposal + pull request] Replace logo GUIDs with data URIs

2012-07-14 Thread Brandon Wamboldt
FYI, data URIs are only supported in IE8 or higher, IE7 and below do not support them. On Sat, Jul 14, 2012 at 6:16 PM, Rasmus Lerdorf wrote: > On 07/14/2012 01:49 PM, Andrew Faulds wrote: > > Hi there, > > > > This is a patch that replaces PHP's infamous logo GUIDs with data URIs > > instead, a

Re: [PHP-DEV] [proposal + pull request] Replace logo GUIDs with data URIs

2012-07-14 Thread Stas Malyshev
Hi! > And I actually know of websites using the functions to display the logo.. > Is there some way we could provide a BC function for it somehow? > Maybe rather then removing the functions, make then return the data uris? Having the functions to get the images sounds like a good idea, some sites

[PHP-DEV] imap_headerinfo defaulthost parameter

2012-07-14 Thread Stas Malyshev
Hi! Could anybody tell me what defaulthost parameter is supposed to do in imap_headerinfo()? The docs say nothing about it and it doesn't seem to be used anywhere in the code. Any ideas? Should we just remove it or it serves some purpose? -- Stanislav Malyshev, Software Architect SugarCRM: http:/

[PHP-DEV] installing from source on mac osx 10.7.3

2012-07-14 Thread Yader Hernandez
I can't seem to get a vanilla php binary from a simple $ ./configure make make install The last few lines indicate that everything went well: Installing PHP SAPI module: cgi Installing PHP CGI binary: /usr/local/bin/ *Installing PHP CLI binary:/usr/local/bin/* Installing PHP CLI ma

Re: Re: [PHP-DEV] 6.0 And Moving Forward

2012-07-14 Thread Morgan L. Owens
On 2012-07-14 04:12, jpauli wrote: On Fri, Jul 13, 2012 at 5:33 PM, Anthony Ferrara wrote: 4. Rewrite the entire parser completely. I keep hearing about how bad PHP's parser is, and how it's growing out of control. Perhaps this is a good time to rewrite it (perhaps changing semantics slightly)

[PHP-DEV] qa.php.net pulls screen does not display all the pulls

2012-07-14 Thread Stas Malyshev
Hi! When I go to qa.php.net to see pulls for php-src, I only see pulls down to number 56, but earlier ones are not displayed for some reason. Does anybody know what's wrong with it and could fix it? Thanks, -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-690

[PHP-DEV] bug #49510

2012-07-14 Thread Stas Malyshev
Hi! We've got a bit of a discussion on bug #49510 in the comments. The problem is this: filter_var('', FILTER_VALIDATE_BOOLEAN, array("flags" => FILTER_NULL_ON_FAILURE)) returns "null" (i.e. failure) while docs say boolean filter will return false on ''. I think we need to sync with the docs. The