Re: Typed properties problems
| From: | guilhermeblanco@gmail.com | Date: | Tue, 17 Jan 2017 15:02:09 +0000 |
| Subject: | Re: Typed properties problems | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97814@lists.php.net to get a copy of this message | ||
Where can I see progress of this work?
On Tue, Jan 17, 2017 at 5:03 AM, Dmitry Stogov <dmitry@zend.com> wrote:
> Hi Bob,
>
>
> I've found a number of problems:
>
>
> $ sapi/cli/php -r 'class Foo {public bool $b = false;} $x = new Foo;
> $x->b->ops += 5; echo gettype($x->b),"\n";'
>
> object
>
> $ sapi/cli/php -r 'class Foo {public bool $b = false;} $x = new Foo;
> $x->b->ops++; echo gettype($x->b),"\n";'
> object
>
> $ sapi/cli/php -r 'class Foo {public bool $b = false;} $x = new Foo;
> $x->b->ops = 5; echo gettype($x->b),"\n";'
> object
>
> $ sapi/cli/php -r 'class Foo {public bool $b = false;} $x = new Foo;
> $x->b[] = 5; echo gettype($x->b),"\n";'
> array
>
> Thanks. Dmitry.
>
>
--
Guilherme Blanco
Senior Technical Architect at Huge Inc.