FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » const var, self:: or static::
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
const var, self:: or static:: [message #177963] Wed, 02 May 2012 09:45 Go to previous message
Simon is currently offline  Simon
Messages: 29
Registered: February 2011
Karma:
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: installing PHP zip onto a solaris system
Next Topic: Session variables..
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 02:04:58 GMT 2024

Total time taken to generate the page: 0.13395 seconds