Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58877 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79708 invoked from network); 12 Mar 2012 14:09:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2012 14:09:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=linepogl@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=linepogl@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: linepogl@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:54335] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/4A-20445-6930E5F4 for ; Mon, 12 Mar 2012 09:09:27 -0500 Received: by ggmb2 with SMTP id b2so2919323ggm.29 for ; Mon, 12 Mar 2012 07:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=p+83coQZhkybEJbiMnQkIC+HHjleBaBOMiklNCHwe5I=; b=DwiIc1zrPbFfxl2yn2lnvAi3QJnKQaphdMEt1zZR+mQ5nncpadExnP+hrau5kWdDle aCX7CfwQRjjIpq/jI3XVSd14s4GTDMRpPCRmrNgtqDvSR8gf2IhEjaIEV9Q/R7w8NEpe rvshD02pSGos5Ug0h2q+twIUk6kLEc3fDXuPQDg6zBVdh8hyxiI3BrdXky08iyZCZlMa E1c18LEwPlLGOVaHq8mevGmD22Jzv6PHC3OtbLgvKUMk+UcpZgyNCXMtr4LniIOhAoZ4 0mtuIIhkQkxDiNYpyhWJ8/3uH/dwjldV9wXBHJwD29+4gW+3COF1X0S72PDEoTgLb0E0 6DYA== Received: by 10.101.176.14 with SMTP id d14mr4163583anp.26.1331561364248; Mon, 12 Mar 2012 07:09:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.172.8 with HTTP; Mon, 12 Mar 2012 07:09:04 -0700 (PDT) In-Reply-To: References: Date: Mon, 12 Mar 2012 15:09:04 +0100 Message-ID: To: Arvids Godjuks Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001636c92c1c1cd8de04bb0c4afb Subject: Re: [PHP-DEV] [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters From: linepogl@gmail.com (Lazare Inepologlou) --001636c92c1c1cd8de04bb0c4afb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello Arvids, The patch of Anthony, clearly states that this is accepted: function foo ( int $bar =3D null ) { } And this is what I called an int|null. Lazare INEPOLOGLOU Ing=C3=A9nieur Logiciel 2012/3/12 Arvids Godjuks > 2012/3/12 Lazare Inepologlou > >> > I'm not sure about you, but I don't wanna see that kind of thing >> eventually making it's way into the language >> >> Me neither. All I am saying is that, since int|null is already here from >> the back door, I think it should be properly supported. >> > > There is no int|null at the moment, and should not be. You can pass > anything - object, array, string, bool, int, float resource, callable - > they all are accepted and are checked in function body if it's writer wro= te > that code. > Hint should provide a hint for a single type, or hint doesn't belong ther= e. > --001636c92c1c1cd8de04bb0c4afb--