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

From: Date: Sat, 14 Apr 2012 22:00:51 +0000
Subject: Re: New Feature: Fully qualified class name resolution as scalar with class keyword
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Am 14.04.2012 23:14, schrieb Marco Pivetta:
I used to implement `public static function getClass() { return get_called_class(); }`, so I really like this one, makes it also easier for IDEs when refactoring code :) I was wondering about class A { const CLASS = 'hello'; } but that would cause an unexpected T_CLASS, so I guess there's no conflicts...
I have
    class A { const _CLASS = __CLASS__; }
in many classes. This feature would help a lot.
Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


Thread (41 messages)

« previous php.internals (#59938) next »