Re: New Feature: Fully qualified class name resolution as scalar with class keyword
From: Sebastian Krebs 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 aboutI haveclass A { const CLASS = 'hello'; }
but that would cause an unexpectedT_CLASS
, so I guess there's no conflicts...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 » |
---|