Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96298 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34919 invoked from network); 9 Oct 2016 07:33:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Oct 2016 07:33:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.219 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.219 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.219] ([81.169.146.219:14888] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/9A-20821-2C2F9F75 for ; Sun, 09 Oct 2016 03:33:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1475998398; l=3924; s=domk; d=kelunik.com; h=Content-Type:To:Subject:Date:From:In-Reply-To:References: MIME-Version; bh=rEaCoU8ZR8xWR3b0F2mFJiMphhAbQcMg0CJvMFN+f2g=; b=Rebk93xN6lNeAH8tI0x+JU/BtnaYO7JfUW4+PRskw2naeLm+auqt7eIHtgUfUyyeJdv PoP+1biK1HuML04S68KKny70kBLNJBatzHL4nw/yK4dgtFfxQN7hQ3/wd3bgE3U7NzdOK Ui04raTakQqJpX+cjYJLXtOmrZu0B/LxzMk= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLGvomb4bl9EfHtO3s6 X-RZG-CLASS-ID: mo00 Received: from mail-wm0-f48.google.com ([74.125.82.48]) by smtp.strato.de (RZmta 39.5 AUTH) with ESMTPSA id n0b713s997XI69m (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp384r1 with 384 ECDH bits, eq. 7680 bits RSA)) (Client did not present a certificate) for ; Sun, 9 Oct 2016 09:33:18 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id b201so116739815wmb.0 for ; Sun, 09 Oct 2016 00:33:18 -0700 (PDT) X-Gm-Message-State: AA6/9Rm+XO9ipr0o6B+T5+B8/p3rbDHiGpG62th+MoP8MmtVdrnj4nKHJrAkEgIle5bL2IFK6X2W1X47yjDKHg== X-Received: by 10.194.60.106 with SMTP id g10mr18074794wjr.151.1475998398723; Sun, 09 Oct 2016 00:33:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 09 Oct 2016 07:33:08 +0000 X-Gmail-Original-Message-ID: Message-ID: To: Sebastian Bergmann , PHP Internals Content-Type: multipart/alternative; boundary=047d7b86ead43ec22e053e69a8e5 Subject: Re: [PHP-DEV] Reflection API and Nullable Types From: me@kelunik.com (Niklas Keller) --047d7b86ead43ec22e053e69a8e5 Content-Type: text/plain; charset=UTF-8 Sebastian Bergmann schrieb am So., 9. Okt. 2016, 08:56: > At some point in time during the development of PHP 7.1 this code > > function f(?int $x) > { > } > > $f = new ReflectionFunction('f'); > > var_dump((string) $f->getParameters()[0]->getType()); > var_dump($f->getParameters()[0]->getType()->getName()); > > printed > > string(4) "?int" > string(3) "int" > > and now it prints > > string(4) "int" > string(3) "int" > > I know that this issue (or a similar one) was recently discussed but after > reading through that thread I am not 100% sure whether the current > behavior is indeed the intended one. > See http://externals.io/thread/321 The change has been made to provide backwards compatibility. __toString is now deprecated and getName should be used. Regards, Niklas Thanks! > Sebastian > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --047d7b86ead43ec22e053e69a8e5--