Re: Union Type (singular) straw man proposal

From: Date: Thu, 05 Sep 2019 09:51:35 +0000
Subject: Re: Union Type (singular) straw man proposal
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-106869@lists.php.net to get a copy of this message
Why does the class Number in the example has a $number property and use $this->number->value() rather than $this->value() ? What is the difference between its getNumber method and its value method? Is $this->number and $this->number->number pointing the same object or is $this->number->number NULL? This example is really confusing me more than anything else. The "function showNumber" example is using $this->number instead of $number I think. All in all I do not understand the benefits of this approach compared to Nikita’s RFC. What does this allow you to do that you cannot do without? Côme

« previous php.internals (#106869) next »