> Am 16.03.2016 um 19:05 schrieb Johannes Schlüter <johan...@schlueters.de>:
> 
> On Wed, 2016-03-16 at 18:50 +0100, Bob Weinand wrote:
>> The patch currently prevents that.
>> It prevents all creation of references to properties.
> 
> To all properties? Thus
> 
> class C {
>  private $data = []; // No type, old code
> 
>  public function sort() {
>    sort($this->data);
>  }
> }
> 
> won't work anymore? - I think that's a major break to the language.
> 
> Workaround then would be:
> 
> class C {
>  private $data = []; // No type, old code
> 
>  public function sort() {
>    $data = $this->data;
>    sort($data);
>    $this->data = $data;
>  }
> }
> 
> Or is there a simpler way? - Quite ugly and quite some migration pain.

Eih, only to typed properties. Everything else would be insane ;-)
Sorry for being imprecise.

>> The reason is technical:
>> We'd basically need typed zvals.
>> Or add some sort of write callback to typed references.
> 
> That matches my assumption.
> 
> 
> Slightly un-serious:
> 
>> If you have a clean solution to these issues, you're more than welcome to 
>> contribute here.
> 
> - No typing
> - No references
> 
> :-D

E_BC_BREAK :-P

> johannes

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

Reply via email to