Re: Re: New Feature: Fully qualified class name resolution as scalar with class keyword

From: Date: Tue, 17 Apr 2012 18:45:48 +0000
Subject: Re: Re: New Feature: Fully qualified class name resolution as scalar with class keyword
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
> From the collisions point of view class and __CLASS__ are equally
> safe.

> Imho ClassName::class reads nicer and also looks similar to the
> similar ClassName.class syntax in Java.

The current __CLASS__ could then be written self::class. Looks more
"namespace/object oriented", where __CLASS__ feels procedural?

How would static::class behave ? is it handled by the current patch?
Maybe the test case could be extended to reflect this, and also for
self::class?


Thread (41 messages)

« previous php.internals (#60093) next »