S.A.N wrote on 12/02/2016 15:21:
It's not just a matter of taste, the object is always passed by
reference, an array is copied when you change, object literal syntax
like JSON, sorely lacking in PHP.
Objects are passed by *pointer*, because they're expected to have
methods that mutate their st
2016-02-12 17:15 GMT+02:00 Rowan Collins :
> S.A.N wrote on 12/02/2016 15:13:
>>
>> But is also necessary and the function or operator like
>> object_assign($target, ...$sources)
>
>
> Like I say, for that kind of purpose, I'd just use an array, which already
> has the facilities for working with a
S.A.N wrote on 12/02/2016 15:13:
But is also necessary and the function or operator like
object_assign($target, ...$sources)
Like I say, for that kind of purpose, I'd just use an array, which
already has the facilities for working with arbitrary keys. But I know
some people think $foo->bar "l
2016-02-12 16:55 GMT+02:00 Rowan Collins :
> S.A.N wrote on 12/02/2016 14:39:
>>
>> 2016-02-12 16:27 GMT+02:00 Rowan Collins :
>>>
>>> S.A.N wrote on 12/02/2016 13:37:
Often all keys are unknown, or a very lot keys, use list(...) - is
unreal.
I would like to, instead >>>
>>
S.A.N wrote on 12/02/2016 14:39:
2016-02-12 16:27 GMT+02:00 Rowan Collins :
S.A.N wrote on 12/02/2016 13:37:
Often all keys are unknown, or a very lot keys, use list(...) - is unreal.
I would like to, instead $value)
{
$this{$key} = $value
}
Use the short syntax sugar
It's really do?
2016-02-12 16:27 GMT+02:00 Rowan Collins :
> S.A.N wrote on 12/02/2016 13:37:
>>
>> Often all keys are unknown, or a very lot keys, use list(...) - is unreal.
>>
>> I would like to, instead >
>> foreach($params as $key => $value)
>> {
>> $this{$key} = $value
>> }
>>
>> Use the short syntax sugar
S.A.N wrote on 12/02/2016 13:37:
Often all keys are unknown, or a very lot keys, use list(...) - is unreal.
I would like to, instead $value)
{
$this{$key} = $value
}
Use the short syntax sugar
It's really do?
If the keys are unknown, then you probably don't want to blindly copy
them on
Often all keys are unknown, or a very lot keys, use list(...) - is unreal.
I would like to, instead $value)
{
$this{$key} = $value
}
Use the short syntax sugar
It's really do?
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hmm, I have to disagree…
1. Just as intuitive as the whole list() construct. I don’t see where this
particular addition adds any strangeness.
For your readability/hard to read code problem I think the RFC is just doing a
bad formatting job:
list("name" => $this->name,
"colour" => $
Hi,
On Mon, Feb 8, 2016 at 3:34 PM, Pierre Joye wrote:
> On Fri, Feb 5, 2016 at 7:55 PM, Andrea Faulds wrote:
>> Hi everyone,
>>
>> It's been more than two weeks since I first proposed this RFC, and there's
>> no outstanding issues preventing moving towards a vote. There's not yet a
>> language
On Fri, Feb 5, 2016 at 7:55 PM, Andrea Faulds wrote:
> Hi everyone,
>
> It's been more than two weeks since I first proposed this RFC, and there's
> no outstanding issues preventing moving towards a vote. There's not yet a
> language specification patch, but that can be done later.
>
> So, I'm ope
Hi Levi,
Levi Morrison wrote:
I wanted to chime in since I voted no. I'm not strongly opposed to
this behavior but I do have concerns about the key behavior that was
changed. In an example in the RFC:
list($foo => $bar) = $array;
I don't think this really makes sense. `$foo` is being eval
Hi,
2016-02-05 23:58 GMT-04:00 Levi Morrison :
> On Fri, Feb 5, 2016 at 5:55 AM, Andrea Faulds wrote:
>> Hi everyone,
>>
>> It's been more than two weeks since I first proposed this RFC, and there's
>> no outstanding issues preventing moving towards a vote. There's not yet a
>> language specifica
On Fri, Feb 5, 2016 at 5:55 AM, Andrea Faulds wrote:
> Hi everyone,
>
> It's been more than two weeks since I first proposed this RFC, and there's
> no outstanding issues preventing moving towards a vote. There's not yet a
> language specification patch, but that can be done later.
>
> So, I'm ope
Hi everyone,
It's been more than two weeks since I first proposed this RFC, and
there's no outstanding issues preventing moving towards a vote. There's
not yet a language specification patch, but that can be done later.
So, I'm opening the vote on this RFC today, 2016-02-05, and it'll close
15 matches
Mail list logo