On Wed, Mar 16, 2016 at 1:39 PM, Johannes Schlüter
<johan...@schlueters.de> wrote:
> On Wed, 2016-03-16 at 12:36 -0400, Phil Sturgeon wrote:
>> Hello everyone,
>>
>> I have completed the draft for an RFC, to add Typed Properties. The
>> patch has been written by the one and only Joe Watkins.
>>
>> https://wiki.php.net/rfc/typed-properties
>
> I'm no fan of all this typing business, but that's a lost case. Anyways:
> What about references? (yeah, references should die, but currently they
> still exist)
>
> What's expected here:
>
> class A {
>   public int $i;
> }
>
> $a = new A();
> $r = &$a->i;
> $r = "foobar";
>
> johannes
>
>

Hey there!

I put your code into 3v4l so you could see what would happen:

https://3v4l.org/taC8D

Fatal error: Uncaught TypeError: Typed property A::$i must not be referenced

Is that what you expect? If not, what would you expect?

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to