Home »
Imported messages »
comp.lang.php »
const var, self:: or static::
const var, self:: or static:: [message #177963] |
Wed, 02 May 2012 09:45  |
Simon
Messages: 29 Registered: February 2011
Karma: 0
|
Junior Member |
|
|
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
|
|
|
|
|
|
Goto Forum:
Current Time: Wed Mar 05 18:58:17 GMT 2025
Total time taken to generate the page: 0.04342 seconds