Re: ReflectionType::__toString() prepending \ to class names

From: Date: Sun, 21 Aug 2016 16:00:28 +0000
Subject: Re: ReflectionType::__toString() prepending \ to class names
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-95349@lists.php.net to get a copy of this message
> > This is the ultimate point: if we don't prepend the question mark it will >> break code. >> > > This is the impedence here: ReflectionType is a *REFLECTION*, > not a code > generator. Don't think of ReflectionType#__toString() as a > way to > generate code: it is merely a string representation of the reflectoion. > This is the last I have to say on anything: You just proved the point. It's a *reflection* of what was written. If it's a nullable type then it needs a nullable reflection in the toString.

« previous php.internals (#95349) next »