Re: Return Type Hinting for Methods RFC

From: Date: Thu, 22 Dec 2011 23:21:56 +0000
Subject: Re: Return Type Hinting for Methods RFC
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-57040@lists.php.net to get a copy of this message
On Thu, 22 Dec 2011, Will Fitch wrote: > On Dec 22, 2011, at 10:11 AM, Dmitri Snytkine wrote: > > > I think the return type hinting really depends on variable type hinting. > > A simple example whould bea typical getter function > > > > public function \Customer getCustomer(){ > > return $this->customer; > > } > > The actual syntax would be: > > public \Customer getCustomer() Really? I saw this in the RFC when I skimmed over it, but presumed that to be a mistake. I do not see it as a great idea to remove the "function" part as it's *so* PHP right now. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug

« previous php.internals (#57040) next »