Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108075 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 46396 invoked from network); 9 Jan 2020 22:43:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Jan 2020 22:43:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 747601804D1 for ; Thu, 9 Jan 2020 12:49:10 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 9 Jan 2020 12:49:09 -0800 (PST) Received: by mail-oi1-f173.google.com with SMTP id z64so7149821oia.4 for ; Thu, 09 Jan 2020 12:49:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RgY251pXXxN8iwEOo76JL61Zp2RqtsICULKhFhL9DCg=; b=AFsfJcUXm3+XYTfY+2VIXc/bwGbcPJOZQbkYX4rWi7PA3vW7Xrm3j80Z3RYbTfFnml BgjqhceTlE+a7ai4tDtb0dxzgsP02OeM3lFDriPUlCYlYfzXItBHQr0sOWNar0zS9u36 P36pvRVwds/Md/vgeK2rt4hD9Gj9uK9HVYh6K4L8jlDmYfk3IIEMvOi420EOigGAavn/ S2cMxXK6rjb8W4DhiieUrZIbgQPMT2hmY0WT1QKE7QifqpHjaA4pfoFI4meSWeaAGvWA b8URwMypZt7FUXYkexm8MGOe4YFJBsOdyVjW54Mr4WGykrPReeMpr1XkleWxAEZcfSHg AnHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RgY251pXXxN8iwEOo76JL61Zp2RqtsICULKhFhL9DCg=; b=enbfIPTUCAZUhF3PWa9SsYSegQ5qoezVaqNXl3H1f4fwHfLTe5oKbAk75AaqfLlr7d Neegb316mBWOEd/adZCRCfdkR6AuoI6M83WytIAiMtFyUWcjbbEcn1bDo5CCI4h481pv Y1lwMCM4/+slADyU1JSDbI0xbQ5UM4lYEVPmNcseRjPZQyzOCYs55ydjA2FTgs/WduCK wbxXhTZ1gYSLDh3VUaqEPhZslLL9sylk5ZoUGWkp1RzO3c09IjoFEo1KavTDKyKl1SMM eRitCA5RXdBUetUXlrtUdsYdyTHyUHHNQZVMwMDeQYxQjo0yf9uNpRHWBQ5JEg1xXv1T h8wg== X-Gm-Message-State: APjAAAUerUSmqlc6OE2AA4YXH6HpP7ZsZ6mZK+g2DzWr29R70ftVEYjr I7BiyAnjDO4YWUWRD06TrSCbajRRrP08aH086jc= X-Google-Smtp-Source: APXvYqwPDsL+vLhxrmh7Bj7f8l68Q2zqeo029MKB4TCLqQJ8IdHYsCwDtZbsafbcrIMgEagGbWxPW/8bd9eaKUKUI3M= X-Received: by 2002:aca:aac3:: with SMTP id t186mr4761076oie.71.1578602948555; Thu, 09 Jan 2020 12:49:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 9 Jan 2020 21:48:57 +0100 Message-ID: To: Nikita Popov Cc: Ralph Schindler , PHP internals Content-Type: multipart/alternative; boundary="000000000000fd7ad4059bbb23e4" Subject: Re: [PHP-DEV] [RFC] Allow ::class on objects From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000fd7ad4059bbb23e4 Content-Type: text/plain; charset="UTF-8" > > $fooClass = Foo::class; > > echo $foo::class; // TypeError b/c string? > > Yes, at least per the current proposal. Whether to allow this is listed as > an open question. > I missed that part! If it could return `string`, that'd be super useful! We have tons of lines of code that look like: is_object($foo) ? get_class($foo) : gettype($foo) Getting rid of them would be very sweet ! Nicolas --000000000000fd7ad4059bbb23e4--