Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74661 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19676 invoked from network); 30 May 2014 18:50:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 May 2014 18:50:08 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.220.44 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.220.44 mail-pa0-f44.google.com Received: from [209.85.220.44] ([209.85.220.44:50764] helo=mail-pa0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/91-07154-0E2D8835 for ; Fri, 30 May 2014 14:50:08 -0400 Received: by mail-pa0-f44.google.com with SMTP id lj1so1998355pab.17 for ; Fri, 30 May 2014 11:50:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=eYiPzTCOEQQ/OyvyUnic1waN7ivD3+tHWXUurBad414=; b=Gl6NPyQGvX0GYYbOi5a16+JsIrwAnnKMOFsS56FoG7BWhbs5vhj3zqNs+LJ/YNgirQ YzPWWAqmrlyO43ovzGkpUiHIuEV7OWuwXsIPJRgsMfszwJBjDj/EiQihBBi2eGxS/zFw v+frrCgqAbNjz+SvT+63UxTdxFM7BSuWAy3CZQYUhNW1ccW17gPFEwB9O4TWU8b5Rbwo BscmNJDetYtUvwVAirbNhqteoHrTVUPAaIekrNdDjT9FMTQMONVThLKRccK3p4fy+Qah PTLp2ZdpmFhy93YMVU0H57vXyKyboJVycxwTUL9av7dZ0doDh8abl1tYIDKBV3n/deKO F4ow== X-Gm-Message-State: ALoCoQkboK724RYHO//5s5VjE3W+mT5VIYluGrhGIWXlCfwwvWbWsdsQVSe0K1M7wixAIB/xb0I6 MIME-Version: 1.0 X-Received: by 10.66.139.201 with SMTP id ra9mr21157886pab.84.1401475805510; Fri, 30 May 2014 11:50:05 -0700 (PDT) Sender: php@golemon.com Received: by 10.70.100.67 with HTTP; Fri, 30 May 2014 11:50:05 -0700 (PDT) X-Originating-IP: [69.63.185.56] In-Reply-To: References: Date: Fri, 30 May 2014 11:50:05 -0700 X-Google-Sender-Auth: 03rbYVTz9DeHNW2Ncf-2Stxk8S8 Message-ID: To: Adam Harvey Cc: Levi Morrison , Derick Rethans , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] ReflectionParameter::hasTypehint() / getTypehintText() From: pollita@php.net (Sara Golemon) On Thu, May 29, 2014 at 10:06 PM, Adam Harvey wrote: > I'd prefer NULL to indicate the complete absence of a type hint too =E2= =80=94 > it ends up as an empty string if it's used in that context regardless, > but the changed type is useful. I don't feel strongly enough about > this that it would affect my vote, though. > The current version of the RFC makes this point moot. hasTypeAnnotation() would return false, while getTypeAnnotation() would return NULL (as opposed to a ReflectionTypeAnnotation instance) The new equivalent to $rp->getTypehintText() is now (string)$rp->getTypeAnnotation() -Sara