Re: [PHP-DEV] [RFC] Spread Operator in Array Expression v0.2

2019-04-13 Thread Stijn Peeters
"Dan Ackroyd" schreef op 6 april 2019 07:37: > On Fri, 5 Apr 2019 at 09:03, Claude Pache wrote: > >> That begs the question: why is this invalid for function calls? > > At least in part, because if we ever wanted to add a standard > _toArray() method, like we have __toString(), it would be qui

Re: [PHP-DEV] [RFC] Spread Operator in Array Expression v0.2

2019-04-05 Thread Stijn Peeters
Hi, If I understand correctly it is possible in this proposal to use normal arguments after using an unpackable argument: $arr4 = array(...$arr1, ...$arr2, 111); //valid This is something that is not possible when using argument unpacking in function calls: $result = someFunct

Re: [PHP-DEV] Question about adding !function_identifier

2019-04-03 Thread Stijn Peeters
I think the issue here is that there is no functional difference between an exclamation mark prefix and a docblock attribute, and the latter has the advantage of being more explicit, not requiring changes to the language syntax itself, and being an already-existing standard.  Of course things m