Re: [RFC] Alternative typehinting syntax for accessors

From: Date: Sun, 06 Jan 2013 14:00:45 +0000
Subject: Re: [RFC] Alternative typehinting syntax for accessors
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to internals+get-64604@lists.php.net to get a copy of this message
On Sun, Jan 6, 2013 at 10:05 AM, Patrick Schaaf <php@bof.de> wrote: > Was it considered to augment type hinting syntax - both in parameter lists > and for the hinted property RFC - to permit giving multiple types at once? > > public DateTime|DateTimeImmutable $refdate; > public Foo|NULL $object; // the issue discussed in the previous msgs > function bar(array|string $arg) ... > > best regards > Patrick > That's an interesting idea (at least something worth discussion), but please in a different thread. Same goes to the initializers that were mentioned previously in this thread. Both things are related to this proposal, but only slightly, and should be discussed separately to keep things clean. Thanks :) Nikita

« previous php.internals (#64604) next »