Re: [RFC Discussion] Typed Properties
| From: | Levi Morrison | Date: | Tue, 29 Mar 2016 23:16:11 +0000 |
| Subject: | Re: [RFC Discussion] Typed Properties | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92000@lists.php.net to get a copy of this message | ||
> 2) The handling of multiple properties in the same declaration statement is inconsistent.
>
> public int $bar, string $qux; // this works
>
> public int $bar, $qux; //this emits error: Untyped property A::$qux must not be mixed
> with typed properties
>
> It's better to allow type only before first property in the list and apply them to all of
> them (like C, Java and others).
> Is this just an implementation issue?
I'm actually glad this is prevented because it's confusing. Is
$qux
typed or untyped?