[PHP-DEV] Re: [RFC][VOTE] Session ID without hashing

2016-07-11 Thread Yasuo Ohgaki
Hi all, On Sat, Jul 2, 2016 at 4:35 PM, Yasuo Ohgaki wrote: > Currently session module uses obsolete MD5 for session ID. With > CSPRNG, hashing is redundant and needless. It adds hash module > dependency and inefficient (There is no reason to use hash for CSPRNG > generated bytes). > > This propo

[PHP-DEV] [RFC][VOTE] Enable session.use_strict_mode by default

2016-07-11 Thread Yasuo Ohgaki
Hi all, Vote for "Enable session.use_strict_mode by default" RFC has started. https://wiki.php.net/rfc/session-use-strict-mode Vote ends 2017/07/19 UTC. Thank you for voting! -- Yasuo Ohgaki yohg...@ohgaki.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: htt

Re: [PHP-DEV] Proposal for php7 class method return

2016-07-11 Thread Stanislav Malyshev
Hi! > $counter->count(); > $counter->count(); > $counter->count(); > $counter->count(); > echo $counter->getCount(); I still fail to see what's so wrong in this code that it needs a whole new operator to fix it. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development M

Re: [PHP-DEV] Cascade Operator (was Re: [PHP-DEV] Proposal for php7 class method return)

2016-07-11 Thread Jesse Schalken
On Tue, Jul 12, 2016 at 2:30 AM, Rasmus Schultz wrote: > > Would something like ->> be ambiguous as well? That's fairly close too > - a double-headed arrow, not unlike the double dots of other > languages... > > A few weeks ago I proposed a syntax for setting multiple object properties in an expr

Re: [PHP-DEV] Proposal for php7 class method return

2016-07-11 Thread Rowan Collins
On 11/07/2016 21:17, Marco Pivetta wrote: On 11 July 2016 at 22:15, Rowan Collins > wrote: Again, it's just different syntax for doing things we can already do. Spot on! Plus it's something arguably considered a bad idea. I don't think that adding language

Re: [PHP-DEV] Cascade Operator (was Re: [PHP-DEV] Proposal for php7 class method return)

2016-07-11 Thread Larry Garfield
On 07/11/2016 11:30 AM, Rasmus Schultz wrote: what's the actual added value of this sort of operator? The only direct value to the language is brevity - mere convenience. But I think the biggest indirectly added value, is that this will discourage people from the chainable methods anti-pattern

Re: [PHP-DEV] Proposal for php7 class method return

2016-07-11 Thread Marco Pivetta
On 11 July 2016 at 22:15, Rowan Collins wrote: > Again, it's just different syntax for doing things we can already do. > > Spot on! Plus it's something arguably considered a bad idea. I don't think that adding language features for this sort of thing is useful. Maybe it's even just harmful. Mar

Re: [PHP-DEV] Proposal for php7 class method return

2016-07-11 Thread Rowan Collins
On 11/07/2016 20:56, Marco Pivetta wrote: On 11 July 2016 at 21:51, Jesse Schalken wrote: does save the verbosity of repeating a variable name, and often saves a variable altogether: $blah = new Blah(); $blah->setFoo(1); $blah->setBaz(2); $this->setBlah($blah); becomes $this->setBlah((new

Re: [PHP-DEV] Proposal for php7 class method return

2016-07-11 Thread Marco Pivetta
On 11 July 2016 at 21:51, Jesse Schalken wrote: > > does save the verbosity of repeating a variable name, and often saves a > variable altogether: > > $blah = new Blah(); > $blah->setFoo(1); > $blah->setBaz(2); > $this->setBlah($blah); > > > becomes > > $this->setBlah((new Blah()) > ->setFoo(

Re: [PHP-DEV] Assign return value of function to property or replace parse error with nice fatal error

2016-07-11 Thread Nikita Popov
On Mon, Jul 11, 2016 at 9:39 PM, Khawer . wrote: > It would be better if we can assign return value of function to property. > > If not at least we should generate a nice error message. > > Currently when we try to assign return value of function to property we get > the following error: > Parse

Re: [PHP-DEV] Proposal for php7 class method return

2016-07-11 Thread Jesse Schalken
On Mon, Jul 11, 2016 at 10:18 PM, Marco Pivetta wrote: > Hi Jesse, > > `return $this;` is a fairly common anti-pattern. It can be useful in few > edge-cases, like immutable APIs (CoW) and DSL builders, but it's usually a > bad idea. I ranted extensively about this at > https://ocramius.github.io/

[PHP-DEV] Assign return value of function to property or replace parse error with nice fatal error

2016-07-11 Thread Khawer .
It would be better if we can assign return value of function to property. If not at least we should generate a nice error message. Currently when we try to assign return value of function to property we get the following error: Parse error: syntax error, unexpected '(', expecting ',' or ';' in in

Re: [PHP-DEV] Cascade Operator (was Re: [PHP-DEV] Proposal for php7 class method return)

2016-07-11 Thread Pedro Cordeiro
2016-07-11 13:30 GMT-03:00 Rasmus Schultz : > Regarding syntax - I feel the natural choice, e.g. similar to "." vs > "..", would be a longer arrow --> but that's ambiguous. (decrement > operator, greater than operator) > Yes, it's ambiguous. It will also get confused for the (in)famous "goes to o

Re: [PHP-DEV] Cascade Operator (was Re: [PHP-DEV] Proposal for php7 class method return)

2016-07-11 Thread Michał Brzuchalski
11 lip 2016 18:31 "Rasmus Schultz" napisał(a): > > > what's the actual added value of this sort of operator? > > The only direct value to the language is brevity - mere convenience. > > But I think the biggest indirectly added value, is that this will > discourage people from the chainable methods

Re: [PHP-DEV] [RFC][Vote] ReflectionType Improvements

2016-07-11 Thread Aaron Piotrowski
Hi Levi, > On Jul 9, 2016, at 10:12 AM, Levi Morrison wrote: > > On Sat, Jul 9, 2016 at 8:16 AM, Aaron Piotrowski > wrote: >> >> >> Additionally, I propose adding a getName() method to ReflectionType that >> returns only the name of the type, regardless of nullabili

Re: [PHP-DEV] Cascade Operator (was Re: [PHP-DEV] Proposal for php7 class method return)

2016-07-11 Thread Rasmus Schultz
> what's the actual added value of this sort of operator? The only direct value to the language is brevity - mere convenience. But I think the biggest indirectly added value, is that this will discourage people from the chainable methods anti-pattern - so this has value to the community; those wh

Re: [PHP-DEV] Cascade Operator (was Re: [PHP-DEV] Proposal for php7 class method return)

2016-07-11 Thread Rowan Collins
On 11/07/2016 16:33, Marco Pivetta wrote: Still interested: what's the actual added value of this sort of operator? Arguably, the same value there is any syntax. You could say that the -> operator is just a more readable form of overloaded function calls: class Something { function bar(int

Re: [PHP-DEV] Cascade Operator (was Re: [PHP-DEV] Proposal for php7 class method return)

2016-07-11 Thread Marco Pivetta
Still interested: what's the actual added value of this sort of operator? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 11 July 2016 at 17:28, Rowan Collins wrote: > On 11/07/2016 16:15, Michael Morris wrote: > >> But for that to currently work setSomething must ret

Re: [PHP-DEV] Cascade Operator (was Re: [PHP-DEV] Proposal for php7 class method return)

2016-07-11 Thread Rowan Collins
On 11/07/2016 16:15, Michael Morris wrote: But for that to currently work setSomething must return $this. A cascade operator would avoid this. What about => ? $a->setSomething('here')=>setSomethingElse('there'); This will be ambiguous with array syntax, e.g. $foo = [ $a->foo() => bar() ]

[PHP-DEV] Cascade Operator (was Re: [PHP-DEV] Proposal for php7 class method return)

2016-07-11 Thread Michael Morris
On Sun, Jul 10, 2016 at 6:34 AM, Rasmus Schultz wrote: > > What you're really trying to accomplish is something like the ".." > operator found in some other languages - this is known as the "cascade > operator" in Dart, for example: > > > http://news.dartlang.org/2012/02/method-cascades-in-dart-p

[PHP-DEV] GOOD Benchmark Results for PHP Master 2016-07-11

2016-07-11 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-07-11 06:28:58+03:00 commit: 5f6effe previous commit:d77a8b0 revision date: 2016-07-10 15:15:34+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] Proposal for php7 class method return

2016-07-11 Thread Marco Pivetta
Hi Jesse, On 10 July 2016 at 14:31, Jesse Schalken wrote: > On Sun, Jul 10, 2016 at 8:34 PM, Rasmus Schultz > wrote: > > > > > What you're really trying to accomplish is something like the ".." > > operator found in some other languages - this is known as the "cascade > > operator" in Dart, for

Re: [PHP-DEV] Request for wiki karma

2016-07-11 Thread Niklas Keller
2016-07-10 21:27 GMT+02:00 Charles R. Portwood II < charlesportwoo...@erianna.com>: > On Sun, Jul 10, 2016 at 12:36 AM, Scott Arciszewski > wrote: > > > Version 1.3 of the Argon2 spec alleviated my concerns. > > > > I never completed my patch, and the past couple of months have been > > hectic. I