Well indeed, that would be very confusing and is not really what I meant.
But it was an example anyway and dont blame me when it does not fit in your
use case ;-)
No seriously, you can take email as an example instead:
$email = new Email();
$email := rst...@tutteli.ch
Instead of writin
johan...@schlueters.de]
Gesendet: Mittwoch, 26. Juni 2013 14:14
An: Robert Stoll
Cc: rquadl...@gmail.com; 'Tom Oram'; 'PHP internals'
Betreff: Re: AW: [PHP-DEV] RFC Proposal: New assign value operator
On Wed, 2013-06-26 at 13:54 +0200, Robert Stoll wrote:
> As far as I see it, it is
The property is most likely private and you don’t have to bother about it
anyway.
But yes, for pure PHP users it might seems confusing since PHP variables have
no types. If you are familiar with types and operator overloading than it is
more readable IMO
I assign the new price 29.99 to the
On Wed, 2013-06-26 at 13:54 +0200, Robert Stoll wrote:
> As far as I see it, it is kind of an operator overload mechanism for the
> assign operator.
> This can be useful for small utility classes such as Money, Email etc.
>
> An example was given:
> $price = new MoneyValue();
> $price := 29.99;
>
As far as I see it, it is kind of an operator overload mechanism for the assign
operator.
This can be useful for small utility classes such as Money, Email etc.
An example was given:
$price = new MoneyValue();
$price := 29.99;
Instead of writing something like:
$price = new MoneyValue();
$price-