In the first example $this->name
will never point to the parameter, as you're explicitly referencing the property name
of the current object $this
.
As for the second example you're simply referencing the parameter, and this difference is one of the reasons $this
is used/omitted.