Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Matt Pelmear
On 01/14/2013 10:12 PM, Herman Radtke wrote: If it is called "array_pluck" it should remove the data in question from the original array. (I'm not saying that is a desirable feature here, I'm just saying that makes more sense based on the meaning of the name you seem to prefer.) Why do you think

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Herman Radtke
> If it is called "array_pluck" it should remove the data in question from the > original array. (I'm not saying that is a desirable feature here, I'm just > saying that makes more sense based on the meaning of the name you seem to > prefer.) Why do you think pluck is destructive? In most examples

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-14 Thread Stas Malyshev
Hi! > OK, so now the plan is to merge this onto 5.4: > > https://github.com/cataphract/php-src/compare/php:PHP-5.4...cataphract:strtr_wu94_54 This one looks mostly harmless, so if all strtr tests still pass I think it's OK for 5.4. -- Stanislav Malyshev, Software Architect SugarCRM: http://www

Re: [PHP-DEV] PHP 5.4.10 can not build Zend/PHP parsers with bison 2.6.5

2013-01-14 Thread Christopher Jones
On 01/14/2013 05:16 PM, Dennis Clarke wrote: Dear PHP/Zend folks : This is a bug I think. I recently saw that PHP had been updated to 5.4.10 and I decided to update my php bits in /usr/local. I was quite surprised to see in the configure output this warning about bison : checking for b

RE: [PHP-DEV] FW: Functionality request/proposal

2013-01-14 Thread Paulo Henrique Torrens
Ok, let me try again. Yeah, I know the C++ standard don't allow that semi-colon there... but both GCC and CLang won't complain if you add it there, and GCC accepts it even in Java. I've seem lots of code where people put it there, and I always get a little frustrated when using PHP because I

[PHP-DEV] PHP 5.4.10 can not build Zend/PHP parsers with bison 2.6.5

2013-01-14 Thread Dennis Clarke
Dear PHP/Zend folks : This is a bug I think. I recently saw that PHP had been updated to 5.4.10 and I decided to update my php bits in /usr/local. I was quite surprised to see in the configure output this warning about bison : checking for bison... bison -y checking for bison version...

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-14 Thread Christopher Jones
On 01/14/2013 01:55 PM, Gustavo Lopes wrote: On Wed, 09 Jan 2013 23:45:03 +0100, Gustavo Lopes wrote: On Thu, 03 Jan 2013 11:40:31 +0100, Gustavo Lopes wrote: The algorithm behaves very poorly in this case because at each position of the text, all the substrings starting there and with

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Matt Pelmear
On 01/14/2013 02:19 PM, Lars Strojny wrote: Hi Ben, Am 14.01.2013 um 23:16 schrieb Pierre Joye : [...] Up to you, but I'd to suggest again to re do the vote and add the naming option, easy, clear, open. I was one of the people changing from yes to no because of the name. I like the functional

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Gustavo Lopes
On Mon, 14 Jan 2013 23:43:31 +0100, Lars Strojny wrote: - Do you want to include the functionality: yes/no - If you want to include it, which name should it have: array_column/array_pluck ? You said earlier: I was one of the people changing from yes to no because of the name. I like the

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Lars Strojny
It’s quite simple: - Do you want to include the functionality: yes/no - If you want to include it, which name should it have: array_column/array_pluck Am 14.01.2013 um 23:23 schrieb Gustavo Lopes : > On Mon, 14 Jan 2013 23:16:52 +0100, Pierre Joye wrote: > >> On Mon, Jan 14, 2013 at 11:01

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Gustavo Lopes
On Mon, 14 Jan 2013 23:16:52 +0100, Pierre Joye wrote: On Mon, Jan 14, 2013 at 11:01 PM, Ben Ramsey wrote: I've already removed the array_pluck() alias. Unfortunately, after removing the alias, it appears that some have changed their votes from "yes" to "no," because they preferred the

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Lars Strojny
Hi Ben, Am 14.01.2013 um 23:16 schrieb Pierre Joye : [...] > Up to you, but I'd to suggest again to re do the vote and add the > naming option, easy, clear, open. I was one of the people changing from yes to no because of the name. I like the functionality but I prefer no new array function over

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Pierre Joye
On Mon, Jan 14, 2013 at 11:01 PM, Ben Ramsey wrote: > I've already removed the array_pluck() alias. Unfortunately, after removing > the alias, it appears that some have changed their votes from "yes" to "no," > because they preferred the other function name. > > That said, I'm not going to call f

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Ben Ramsey
On 1/14/13 3:49 PM, Pierre Joye wrote: hi! Btw, really willing to have this function but I agree with other here, the alias must go. It makes no sense to introduce a function and an alias to it at the same time. Maybe restart the vote and let choose function name. Options: 1. array_column 2. a

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-14 Thread Gustavo Lopes
On Wed, 09 Jan 2013 23:45:03 +0100, Gustavo Lopes wrote: On Thu, 03 Jan 2013 11:40:31 +0100, Gustavo Lopes wrote: The algorithm behaves very poorly in this case because at each position of the text, all the substrings starting there and with size between m and n (where m is the size o

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Pierre Joye
hi! Btw, really willing to have this function but I agree with other here, the alias must go. It makes no sense to introduce a function and an alias to it at the same time. Maybe restart the vote and let choose function name. Options: 1. array_column 2. array_pluck 3. none of them Thanks for yo

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Lars Strojny
Nope, it wasn’t rejected, there was simply no response for a really long time: https://github.com/php/php-src/pull/202 Am 14.01.2013 um 22:06 schrieb Herman Radtke : > On Sat, Jan 12, 2013 at 12:04 AM, Levi Morrison > wrote: >> The real problem here (in my opinion) is that `array_filter` does

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Herman Radtke
On Sat, Jan 12, 2013 at 12:04 AM, Levi Morrison wrote: > The real problem here (in my opinion) is that `array_filter` does not > pass the key information to the callback. If you could do that, you > could select columns that way. I opened a PR with this feature, but it was rejected. -- Herman R

Re: [PHP-DEV] Bug #23815: Added extra ImageCopyMergeAlpha function

2013-01-14 Thread Lars Strojny
Any news? Am 04.01.2013 um 13:45 schrieb Pierre Joye : > No need to create another function for that. I will do it once I am back at > work next week. > On Jan 3, 2013 12:33 PM, "Lars Strojny" wrote: > >> No objection from my POV. Going to merge it in around a week, if no one >> objects. >> >>

Re: [PHP-DEV] [Reflection] Improve logic of ReflectionMethod->invokeArgs() for static methods

2013-01-14 Thread Alexander Lissachenko
Probably, it will be better to give a link to the one of examples of AOP integration for laravel framework (requires 5.4.10 to work): https://github.com/lisachenko/laravel-aspect (just clone, install dependencies and look at result) I need to perform weaving of aspects into the original methods, s

Re: [PHP-DEV] [Reflection] Improve logic of ReflectionMethod->invokeArgs() for static methods

2013-01-14 Thread Alexander Lissachenko
I do not use static methods, frameworks and applications use them )). I just want to extend logic of class methods in the application with custom behavior (Logging, Caching) and preserve original scope. It's already done for PHP 5.4 with closures and my library works well with any PHP framework. F

Re: [PHP-DEV] [Reflection] Improve logic of ReflectionMethod->invokeArgs() for static methods

2013-01-14 Thread Sebastian Krebs
2013/1/14 Alexander Lissachenko > My use-case is weaving aspects into the methods. Yeah! ) > > So, I take the original class, rename it and then create a decorator > class instead of original class with overridden dynamic and static > methods. Method in the decorator should make some specific log

Re: [PHP-DEV] [Reflection] Improve logic of ReflectionMethod->invokeArgs() for static methods

2013-01-14 Thread Anthony Ferrara
Alexander, So, I take the original class, rename it and then create a decorator > class instead of original class with overridden dynamic and static > methods. Method in the decorator should make some specific logic and > then just invokes the original static method with Reflection, but the > scop

Re: [PHP-DEV] [Reflection] Improve logic of ReflectionMethod->invokeArgs() for static methods

2013-01-14 Thread Alexander Lissachenko
My use-case is weaving aspects into the methods. Yeah! ) So, I take the original class, rename it and then create a decorator class instead of original class with overridden dynamic and static methods. Method in the decorator should make some specific logic and then just invokes the original stati

Re: [PHP-DEV] [Reflection] Improve logic of ReflectionMethod->invokeArgs() for static methods

2013-01-14 Thread Sebastian Krebs
2013/1/14 Alexander Lissachenko > Hi! It's my first letter here ) > > I want to suggest a small improvement for ReflectionMethod->invoke() > and ReflectionMethod->invokeArgs() methods to support LSB for > overridden static methods. Currently, for invoking static methods > first argument should be

Re: [PHP-DEV] Re: [VOTE] array_column() function

2013-01-14 Thread Anthony Ferrara
Scott, > I did review these, and I like them, but I think they should be added > separately, especially since they deal more with objects than arrays. > > As long as the work with objects that implement ArrayAccess then it should > be fine? > For consistency sake, I would recommend that it does n

Re: [PHP-DEV] Re: [VOTE] array_column() function

2013-01-14 Thread Scott MacVicar
On 14 Jan 2013, at 12:57, Ben Ramsey wrote: > On 1/14/13 11:54 AM, Scott MacVicar wrote: >> On 14 Jan 2013, at 11:37, Ben Ramsey wrote: >> >>> On 1/11/13 6:17 PM, Ben Ramsey wrote: I've opened voting for the array_column() function RFC. You can vote at https://wiki.php.net/rfc/a

Re: [PHP-DEV] Re: [VOTE] array_column() function

2013-01-14 Thread Ben Ramsey
On 1/14/13 11:54 AM, Scott MacVicar wrote: On 14 Jan 2013, at 11:37, Ben Ramsey wrote: On 1/11/13 6:17 PM, Ben Ramsey wrote: I've opened voting for the array_column() function RFC. You can vote at https://wiki.php.net/rfc/array_column#voting I have updated the pull request by removing the

Re: [PHP-DEV] Re: [VOTE] array_column() function

2013-01-14 Thread Scott MacVicar
On 14 Jan 2013, at 11:37, Ben Ramsey wrote: > On 1/11/13 6:17 PM, Ben Ramsey wrote: >> I've opened voting for the array_column() function RFC. >> >> You can vote at https://wiki.php.net/rfc/array_column#voting > > I have updated the pull request by removing the array_pluck() alias. I favor > t

[PHP-DEV] Re: [VOTE] array_column() function

2013-01-14 Thread Ben Ramsey
On 1/11/13 6:17 PM, Ben Ramsey wrote: I've opened voting for the array_column() function RFC. You can vote at https://wiki.php.net/rfc/array_column#voting I have updated the pull request by removing the array_pluck() alias. I favor the array_column() alias, as it is more in keeping with other

[PHP-DEV] Re: Fix for duplicate magic methods calls (bug #63462)

2013-01-14 Thread Dmitry Stogov
Hi Stas, Sorry for delay, I'll able to take a look only tomorrow or after tomorrow. Thanks. Dmitry. On Monday, January 14, 2013, Stas Malyshev wrote: > Hi! > > I made a fix for bug #63462 - https://github.com/php/php-src/pull/258 - > which changes a bit how we do guards by unmangling the names

Re: [PHP-DEV] FW: Functionality request/proposal

2013-01-14 Thread Sebastian Krebs
2013/1/14 Johannes Schlüter > On Mon, 2013-01-14 at 04:10 +, Paulo Henrique Torrens wrote: > > Hi, > > > > I'm currently interested in two features I'd like to see in PHP; how do > I proceed to request/propose them? I'd be glad to help implementing them as > well, if necessary. > > > > > > On

Re: [PHP-DEV] FW: Functionality request/proposal

2013-01-14 Thread Johannes Schlüter
On Mon, 2013-01-14 at 04:10 +, Paulo Henrique Torrens wrote: > Hi, > > I'm currently interested in two features I'd like to see in PHP; how do I > proceed to request/propose them? I'd be glad to help implementing them as > well, if necessary. > > > One of them is really simple, but would b

Re: [PHP-DEV] FW: Functionality request/proposal

2013-01-14 Thread Ángel González
On 14/01/13 05:10, Paulo Henrique Torrens wrote: > Hi, > > I'm currently interested in two features I'd like to see in PHP; how do I > proceed to request/propose them? I'd be glad to help implementing them as > well, if necessary. You should propose it here and then create a rfc about it in the p

Re: [PHP-DEV] [RFC][vote] 5.3 EOL

2013-01-14 Thread Peter Cowburn
On 14 January 2013 09:11, Pierre Joye wrote: > > I opened the voting phase for the 5.3 EOL RFC. > Is there any reason why this RFC was not listed on the RFC listing page? I have added it to the "In voting phase" list, assuming you merely forgot to add it anywhere. -- PHP Internals - PHP Runtime

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-14 Thread Gustavo Lopes
Em 2013-01-11 0:32, Christopher Jones escreveu: How does this compare with your baseline results? I ran some benchmarks. Configure line: CC=gcc-mp-4.8 CFLAGS="-O3 -march=native" ./configure --disable-all --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin10 CPU: Intel(R) Core(TM) i5-25

Re: [PHP-DEV] [RFC][vote] 5.3 EOL

2013-01-14 Thread Adam Harvey
On 14 January 2013 17:16, Laruence wrote: > On Mon, Jan 14, 2013 at 5:11 PM, Pierre Joye wrote: >> hi, >> >> I opened the voting phase for the 5.3 EOL RFC. > where is the voting page? :) https://wiki.php.net/rfc/php53eol Adam -- PHP Internals - PHP Runtime Development Mailing List To unsubsc

[PHP-DEV] Re: [RFC][vote] 5.3 EOL

2013-01-14 Thread Pierre Joye
Arg, sorry :) Here you go: https://wiki.php.net/rfc/php53eol On Mon, Jan 14, 2013 at 10:11 AM, Pierre Joye wrote: > hi, > > I opened the voting phase for the 5.3 EOL RFC. > > I also changed the polls to reduce confusion between the announce and > the actual EOL, to avoid equal results between m

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Adam Harvey
On 12 January 2013 08:17, Ben Ramsey wrote: > I've opened voting for the array_column() function RFC. > > You can vote at https://wiki.php.net/rfc/array_column#voting To be clear, I've voted -1 solely due to the function alias: if this were reproposed with either name (I don't have a strong prefe

Re: [PHP-DEV] [RFC][vote] 5.3 EOL

2013-01-14 Thread Laruence
On Mon, Jan 14, 2013 at 5:11 PM, Pierre Joye wrote: > hi, > > I opened the voting phase for the 5.3 EOL RFC. where is the voting page? :) thanks > > I also changed the polls to reduce confusion between the announce and > the actual EOL, to avoid equal results between many options. > > Thanks for

[PHP-DEV] [RFC][vote] 5.3 EOL

2013-01-14 Thread Pierre Joye
hi, I opened the voting phase for the 5.3 EOL RFC. I also changed the polls to reduce confusion between the announce and the actual EOL, to avoid equal results between many options. Thanks for your upcoming votes and let focus and 5.5+ asap :) Cheers, -- Pierre @pierrejoye | http://blog.thepim

Re: [PHP-DEV] FW: Functionality request/proposal

2013-01-14 Thread Stas Malyshev
Hi! > function multi() { > return 10, 20; > }; This can be done with: function multi() { return [10, 20]; } list($x, $y) = multi(); However, sum() won't work this way: > echo sum(multi()); // echoes 30 But can work this way: call_user_func_array("sum", multi()); -- Stanislav Ma

[PHP-DEV] Fix for duplicate magic methods calls (bug #63462)

2013-01-14 Thread Stas Malyshev
Hi! I made a fix for bug #63462 - https://github.com/php/php-src/pull/258 - which changes a bit how we do guards by unmangling the names before applying guards. This is a slight change of behavior and also means that all private vars with the same name would use the same guard (all protected and p