Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36844 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63146 invoked from network); 7 Apr 2008 13:44:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Apr 2008 13:44:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.94.239.7 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.7 mail.jdi-ict.nl Linux 2.6 Received: from [82.94.239.7] ([82.94.239.7:47694] helo=mail.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/A2-50465-1552AF74 for ; Mon, 07 Apr 2008 09:44:51 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id m37DiiIb024863; Mon, 7 Apr 2008 15:44:44 +0200 Date: Mon, 7 Apr 2008 15:44:45 +0200 (CEST) X-X-Sender: derick@kossu.ez.no To: Mike Lively cc: Felipe Pena , internals@lists.php.net In-Reply-To: <8d7b8c130804062157j60871630r6c3b27c4d3245cb9@mail.gmail.com> Message-ID: References: <1207539695.5736.42.camel@pena> <8d7b8c130804062157j60871630r6c3b27c4d3245cb9@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Subject: Re: [PHP-DEV] Return type hints From: derick@php.net (Derick Rethans) On Sun, 6 Apr 2008, Mike Lively wrote: > On Sun, Apr 6, 2008 at 8:41 PM, Felipe Pena 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