Re: Add support $object::class

From: Date: Thu, 30 Apr 2015 23:43:16 +0000
Subject: Re: Add support $object::class
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-86102@lists.php.net to get a copy of this message
On Mon, Apr 27, 2015 at 10:28 AM, S.A.N <ua.san.alex@gmail.com> wrote: >> Why not? >> > > 1. get_class($object) - looks bad and long > It's a function call. A pretty much self-declarative one at that. What is "bad" about it? For that matter, what's "long" about it? It's pretty short as PHP function calls go. > 2. Illogically - Bar::class valid syntax, $object::class invalid syntax. > I'll grant you the consistency argument. I'm all for consistency, but that's the ONLY valid reason you've stated. > 3. Function call get_class($object) is slower > Not so much so that you'd notice. Fix the performance issues which actually make an impact first. When you've done that, THEN come back. (Hint: You haven't) -Sara

« previous php.internals (#86102) next »