Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #5802
| From | Simon <bad@example.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | const var, self:: or static:: |
| Date | 2012-05-02 11:45 +0200 |
| Message-ID | <a0ce19Fb48U1@mid.individual.net> (permalink) |
If I have something like...
//
class MyClass
{
const MY_CONST = 10;
...
}
//
Inside the class, is it 'better' to use self::MY_CONST or static::MY_CONST?
I say 'better' because it works in both cases.
Or is it just a personal choice.
Thanks
Simon
Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread
const var, self:: or static:: Simon <bad@example.com> - 2012-05-02 11:45 +0200
Re: const var, self:: or static:: Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-02 07:13 -0400
Re: const var, self:: or static:: "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-02 17:25 +0200
Re: const var, self:: or static:: Michael Fesser <netizen@gmx.de> - 2012-05-02 19:55 +0200
csiph-web