Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108642 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57055 invoked from network); 17 Feb 2020 11:50:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Feb 2020 11:50:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 987BD180210 for ; Mon, 17 Feb 2020 02:05:29 -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,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-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 ; Mon, 17 Feb 2020 02:05:29 -0800 (PST) Received: by mail-lf1-f41.google.com with SMTP id 203so11391861lfa.12 for ; Mon, 17 Feb 2020 02:05:28 -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=d5FSC6vxFoq8CwvRaaYHkYgj7HUgmbZ+v/FpH8kNipo=; b=uYYwVPYPXuBoVNH1ltUZ0odfYWDYn1o8Q72zCwn2I06rHis3lC4F7WMySzmhMGaGsY x8yRE89wZDxYi78FxhYCw2F9W/V/ECWVomBTtPqoffrl+FIAKwF/KEaEb+tZ8q7GnY32 2L5yp81sTo5kncx3AaQoE+Ln+urU89p03Fj6nF11BYgRhuhQWIbAMK94RMSo6nL+2PQ+ 4RswaDyQ+7IUPYProZTImdBuvL//1ORxAx+JgSjmjy69SlJezUMMazdd2FLg29Aaz8iK NqMe2lVXmIK0ffIKgmAZRUrthDjbXQgUOYZbwSoQ+0CA5A/A2uMusJtgq2QFKtyvTbtF DVwg== 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=d5FSC6vxFoq8CwvRaaYHkYgj7HUgmbZ+v/FpH8kNipo=; b=i2SNJtemcAh3DBy3MCdTZUFaocvXxYZV97Z7GjQk+eU3+ksa+0jcLIXT5kP2Q4DJ5+ vgmuXl8ejfcPP614gDK9+FbNgmNEJpeQpG8mRwVbFnA7kWF4UbugO1qidvQBl85lgm0S TnZ4tgDh0sqbkfjAVRTsze5T6pXRizf5RIRGXv4blvJgOKTckOwgVmocAuX+hek13n3d NgzjTkUqucVQpy8d5SK5yhowPyABFkzzaxt8zi/XUFqBIt4624lkvFYhR2GNNTakz2N6 4DWuoWbm6Jn0GUOSH47672EXleiLj9D+4efBoLKi7Ug9lUOmJzrtN8Vz8x6zeosOC3hL B0CQ== X-Gm-Message-State: APjAAAULpy+Y/6WjzlAgId6wdmK/cv7w06JLX/haV7RY+UtmKHMF3lzT VkamjvanCg3Ul9Ouai0VAJWXCKVCuCJNqx8H2qa9FbvY X-Google-Smtp-Source: APXvYqwKY0pGj08Ee6hcQJ77eyGEOOhPtxaG9q2onD0DT7vSfDUND2eX82tNNRaUL1N3A1t09xqHP7y14KK42jxww88= X-Received: by 2002:ac2:43af:: with SMTP id t15mr7853646lfl.154.1581933927215; Mon, 17 Feb 2020 02:05:27 -0800 (PST) MIME-Version: 1.0 References: <5e4a6122.1c69fb81.80342.f8e9SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <5e4a6122.1c69fb81.80342.f8e9SMTPIN_ADDED_MISSING@mx.google.com> Date: Mon, 17 Feb 2020 11:05:10 +0100 Message-ID: To: Mark Randall Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000ca3529059ec2b16d" Subject: Re: [PHP-DEV] [RFC] get_debug_type From: nikita.ppv@gmail.com (Nikita Popov) --000000000000ca3529059ec2b16d Content-Type: text/plain; charset="UTF-8" On Mon, Feb 17, 2020 at 10:47 AM Mark Randall wrote: > On 17/02/2020 08:42, Nikita Popov wrote: > >> Can you please add some examples for the behavior? Preferably the > precise > >> output for all primitive types, for classes and for anonymous classes. > > Added to RFC > Thanks! I've taken the liberty of reformatting this into a table. Given the naming discussion, I think there's one important part to highlight here: For anonymous classes, this returns just "class@anonymous", not "class@anonymous\0SOME_RANDOM_UNIQUE_STRING_HERE". Thus this functionality certainly can't be under a ::type construct (which should return the full name), and even get_canonical_type() seems inappropriate. This function is specifically useful for including type names in error messages or similar, thus get_debug_type()... Nikita --000000000000ca3529059ec2b16d--