Re: [RFC] get_debug_type

From: Date: Mon, 17 Feb 2020 10:05:10 +0000
Subject: Re: [RFC] get_debug_type
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-108642@lists.php.net to get a copy of this message
On Mon, Feb 17, 2020 at 10:47 AM Mark Randall <marandall@php.net> 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

« previous php.internals (#108642) next »