[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

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

[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 |

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

2013-01-14 Thread Laruence
On Mon, Jan 14, 2013 at 5:11 PM, Pierre Joye pierre@gmail.com 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.

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

2013-01-14 Thread Adam Harvey
On 12 January 2013 08:17, Ben Ramsey ram...@php.net 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

[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 pierre@gmail.com 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

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

2013-01-14 Thread Adam Harvey
On 14 January 2013 17:16, Laruence larue...@php.net wrote: On Mon, Jan 14, 2013 at 5:11 PM, Pierre Joye pierre@gmail.com 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

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)

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

2013-01-14 Thread Peter Cowburn
On 14 January 2013 09:11, Pierre Joye pierre@gmail.com 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

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 php

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 be

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

2013-01-14 Thread Sebastian Krebs
2013/1/14 Johannes Schlüter johan...@schlueters.de 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.

[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

[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

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

2013-01-14 Thread Scott MacVicar
On 14 Jan 2013, at 11:37, Ben Ramsey ram...@php.net 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

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 ram...@php.net 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

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

2013-01-14 Thread Scott MacVicar
On 14 Jan 2013, at 12:57, Ben Ramsey ram...@php.net wrote: On 1/14/13 11:54 AM, Scott MacVicar wrote: On 14 Jan 2013, at 11:37, Ben Ramsey ram...@php.net 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

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 not

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

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 scope

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

2013-01-14 Thread Sebastian Krebs
2013/1/14 Alexander Lissachenko lisachenko...@gmail.com 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

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.

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,

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 pierre@gmail.com: 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 l...@strojny.net wrote: No objection from my POV. Going to merge it in around a week,

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

2013-01-14 Thread Herman Radtke
On Sat, Jan 12, 2013 at 12:04 AM, Levi Morrison morrison.l...@gmail.com 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

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 hermanrad...@gmail.com: On Sat, Jan 12, 2013 at 12:04 AM, Levi Morrison morrison.l...@gmail.com wrote: The real problem here

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

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 glo...@nebm.ist.utl.pt wrote: On Thu, 03 Jan 2013 11:40:31 +0100, Gustavo Lopes glo...@nebm.ist.utl.pt 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 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.

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

2013-01-14 Thread Pierre Joye
On Mon, Jan 14, 2013 at 11:01 PM, Ben Ramsey ram...@php.net 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

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 pierre@gmail.com: [...] 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

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

2013-01-14 Thread Gustavo Lopes
On Mon, 14 Jan 2013 23:16:52 +0100, Pierre Joye pierre@gmail.com wrote: On Mon, Jan 14, 2013 at 11:01 PM, Ben Ramsey ram...@php.net 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

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 glo...@nebm.ist.utl.pt: On Mon, 14 Jan 2013 23:16:52 +0100, Pierre Joye pierre@gmail.com

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

2013-01-14 Thread Gustavo Lopes
On Mon, 14 Jan 2013 23:43:31 +0100, Lars Strojny l...@strojny.net 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

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 pierre@gmail.com: [...] 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

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 glo...@nebm.ist.utl.pt wrote: On Thu, 03 Jan 2013 11:40:31 +0100, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: The algorithm behaves very poorly in this case because at each position of the

[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

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

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

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:

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 I

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