Re: [PHP-DEV] PHP's handling of BOM (byte order mark)

2016-06-06 Thread Lester Caine
On 06/06/16 22:33, Sammy Kaye Powers wrote: > But the real hum-dinger was from Stack Overflow: > > http://stackoverflow.com/search?q=php+bom > > It does seem to be tripping up a lot of people, especially newbies. As > low as the learning curve is for PHP already, I'm curious if you folks > think

Re: [PHP-DEV] PHP's handling of BOM (byte order mark)

2016-06-06 Thread Sammy Kaye Powers
Hey Stanislav! > In general, I don't think BOM is a real issue worth messing with the > lexer. Surely, from time to time somebody would use weird editor which > produces BOMs, like editing PHP scripts in Word. Surely, they'd have > weird effects that would force them to spend 5 minutes googling

[PHP-DEV] Re: [RFC] [Vote] Callable types (now: Callable prototypes)

2016-06-06 Thread Nikita Nefedov
Evening internals, The vote for Callable prototypes has been declined with 18 votes in favor and 19 against adding the feature. Thanks everyone for participating, we will work on problems raised in the discussion and see if it meets people's expectations in 7.2 -- PHP Internals - PHP

[PHP-DEV] BAD Benchmark Results for PHP Master 2016-06-06

2016-06-06 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-06-06 06:28:15+03:00 commit: e6296f0 previous commit:b7bb6d0 revision date: 2016-06-05 23:44:08+02:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

Re: [PHP-DEV] [RFC] [VOTE] Replace "Missing argument" warning with"Too few arguments" exception

2016-06-06 Thread Christoph Becker
Rowan Collins wrote: > On 06/06/2016 08:22, Dmitry Stogov wrote: > >> This mini RFC has been moved to "Voting" state. Voting >> began on Jun 6 and will close on June 16. >> >> You can find the full RFC at: https://wiki.php.net/rfc/too_few_args >> >> I encourage everyone to read the RFC and cast

Re: [PHP-DEV] Re: Opinion on function/method name overloading

2016-06-06 Thread Lester Caine
On 06/06/16 13:10, Andrea Faulds wrote: > > However, we already have solutions for both of these in PHP. PHP's > functions and methods can have optional parameters for which you do not > have to provide an argument, and because PHP is dynamically-typed, a > parameter can accept an argument of any

[PHP-DEV] Re: Opinion on function/method name overloading

2016-06-06 Thread Christoph Becker
Dominic Grostate wrote: > As I understand it, using Java-like function overloading in PHP is > undesirable due to hindrance in readability. > > However I'd like to get an opinion on whether it would be received more > favourably if it could provide an actual performance enhancement over hand >

Re: [PHP-DEV] Re: Opinion on function/method name overloading

2016-06-06 Thread Dominic Grostate
Thanks. I only wanted some quick input into whether it was worth pursing before I do something daft.. like build it :) All I wanted to know was, if the technicalities could be worked out, and a performance boost was possible, would people still dislike it. I'd still like to see it added, but I

Re: [PHP-DEV] Opinion on function/method name overloading

2016-06-06 Thread Dominic Grostate
Yes, I can see what you mean. Should a float prefer a string or an int? I don't know. That would be a issue unless an additional method of prioritising were involved. Perhaps if attributes get in there will be a solution: <> function foo(int $a) {} <> function

[PHP-DEV] Re: Opinion on function/method name overloading

2016-06-06 Thread Andrea Faulds
Hi, Others have already raised good technical points (performance, how to distinguish when we have dynamic/weak typing), but I'd like to offer another argument against it, that is, that even if it were possible we might not want overloading anyway. From my perspective, function and method

Re: [PHP-DEV] Opinion on function/method name overloading

2016-06-06 Thread Rowan Collins
On 06/06/2016 12:06, Dominic Grostate wrote: float, int and string all share the same row on an upside down pyramid, with $bar, being dynamic, at the bottom. OK, so take away the dynamic case, and assume the caller is in weak mode. Now you have a second case where you need priorities between

Re: [PHP-DEV] Opinion on function/method name overloading

2016-06-06 Thread Dominic Grostate
In your example, the output may be: 0 3 float, int and string all share the same row on an upside down pyramid, with $bar, being dynamic, at the bottom. With regards to union types, it could work exactly like the latest Multi-Catch feature. On 6 Jun 2016 11:57 a.m., "Rowan Collins"

Re: [PHP-DEV] Opinion on function/method name overloading

2016-06-06 Thread Rowan Collins
On 06/06/2016 11:32, Christoph Becker wrote: And we would run into similar issues as with the union types with regard to weak typing. This is probably the biggest hurdle, IMO - regardless of the internal implementation, you've got to define exactly how the feature would work in the language

Re: [PHP-DEV] Opinion on function/method name overloading

2016-06-06 Thread Christoph Becker
Derick Rethans wrote: > On Mon, 6 Jun 2016, Dominic Grostate wrote: > >> As I understand it, using Java-like function overloading in PHP is >> undesirable due to hindrance in readability. > > Besides it impacting, readability, it will also create a large impact on > performance. > > Right

Re: [PHP-DEV] Opinion on function/method name overloading

2016-06-06 Thread Dominic Grostate
Well I had given some thought to that :) Instead of using mangled names and calculating the canonical name at runtime, keep the name, but convert the function hashtable from a table of op arrays into a table linked lists, of op arrays. A non-overloaded function would be the only element in its

Re: [PHP-DEV] [RFC] [VOTE] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-06 Thread Derick Rethans
On Mon, 6 Jun 2016, Rowan Collins wrote: > On 06/06/2016 08:22, Dmitry Stogov wrote: > > > > This mini RFC has been moved to "Voting" state. Voting began on Jun > > 6 and will close on June 16. > > > > You can find the full RFC at: https://wiki.php.net/rfc/too_few_args > > > > I encourage

Re: [PHP-DEV] Opinion on function/method name overloading

2016-06-06 Thread Derick Rethans
On Mon, 6 Jun 2016, Dominic Grostate wrote: > As I understand it, using Java-like function overloading in PHP is > undesirable due to hindrance in readability. Besides it impacting, readability, it will also create a large impact on performance. Right now, functions (and methods) are looked up

Re: [PHP-DEV] [RFC] [VOTE] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-06 Thread Rowan Collins
On 06/06/2016 08:22, Dmitry Stogov wrote: Hi, This mini RFC has been moved to "Voting" state. Voting began on Jun 6 and will close on June 16. You can find the full RFC at: https://wiki.php.net/rfc/too_few_args I encourage everyone to read the RFC and cast your vote towards whichever option

[PHP-DEV] Opinion on function/method name overloading

2016-06-06 Thread Dominic Grostate
Hi, As I understand it, using Java-like function overloading in PHP is undesirable due to hindrance in readability. However I'd like to get an opinion on whether it would be received more favourably if it could provide an actual performance enhancement over hand managed implementation's of

[PHP-DEV] [RFC] [VOTE] Replace "Missing argument" warning with "Too few arguments" exception

2016-06-06 Thread Dmitry Stogov
Hi, This mini RFC has been moved to "Voting" state. Voting began on Jun 6 and will close on June 16. You can find the full RFC at: https://wiki.php.net/rfc/too_few_args I encourage everyone to read the RFC and cast your vote towards whichever option you feel is the best for the language and

[PHP-DEV] [RFC] [VOTE] Fix inconsistent behavior of $this variable

2016-06-06 Thread Dmitry Stogov
Hi, It has been two weeks since discussion started on the RFC to fix inconsistent behavior of $this variable. This RFC has therefore been moved to "Voting" state. Voting began on Jun 6 and will close on June 16. You can find the full RFC at: