Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36829 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75628 invoked from network); 7 Apr 2008 04:57:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Apr 2008 04:57:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=m@digitalsandwich.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=m@digitalsandwich.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain digitalsandwich.com does not designate 72.14.220.154 as permitted sender) X-PHP-List-Original-Sender: m@digitalsandwich.com X-Host-Fingerprint: 72.14.220.154 fg-out-1718.google.com Received: from [72.14.220.154] ([72.14.220.154:7630] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/50-07930-5C9A9F74 for ; Mon, 07 Apr 2008 00:57:41 -0400 Received: by fg-out-1718.google.com with SMTP id 22so1084276fge.23 for ; Sun, 06 Apr 2008 21:57:38 -0700 (PDT) Received: by 10.86.96.18 with SMTP id t18mr3196585fgb.4.1207544258479; Sun, 06 Apr 2008 21:57:38 -0700 (PDT) Received: by 10.86.73.18 with HTTP; Sun, 6 Apr 2008 21:57:38 -0700 (PDT) Message-ID: <8d7b8c130804062157j60871630r6c3b27c4d3245cb9@mail.gmail.com> Date: Sun, 6 Apr 2008 21:57:38 -0700 To: "Felipe Pena" Cc: internals@lists.php.net In-Reply-To: <1207539695.5736.42.camel@pena> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12077_16864449.1207544258458" References: <1207539695.5736.42.camel@pena> Subject: Re: [PHP-DEV] Return type hints From: m@digitalsandwich.com ("Mike Lively") ------=_Part_12077_16864449.1207544258458 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. > :: Question ---------------------------- > - Weird syntax? | > ---------------------------------------- > Yes, is there any reason why any special characters are needed? ------=_Part_12077_16864449.1207544258458--