Re: Return type hints

From: Date: Mon, 07 Apr 2008 13:44:45 +0000
Subject: Re: Return type hints
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-36844@lists.php.net to get a copy of this message
On Sun, 6 Apr 2008, Mike Lively wrote: > On Sun, Apr 6, 2008 at 8:41 PM, Felipe Pena <felipensp@gmail.com> wrote: > > > - PHP types > > > > function (string) foo(...) { } // Unicode string too > > function (object) foo(...) { } // Strict > > function (array) foo(...) { } // Strict > > function (bool) foo(...) { } // Strict > > function (int) foo(...) { } // Accepts numeric string > > function (double) foo(...) { } // Accepts numeric string > > > If there ever were return type hinting in PHP I don't think it would be wise > to support PHP Types unless parameter hints were changed to support them. > It's just inconsistent. Right, this shouldn't even be on the agenda before we have scalar type hints. So, perhaps you can make a patch for that first Felipe? regards, Derick -- Derick Rethans http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

« previous php.internals (#36844) next »