differences and similarities between static and constant
Differences:
constant can not be changed
static variable can not be accessed with the class object
dollar sign is needed to access static variable inside and outside of the class
constant name can not be a keyword, e.g. class (BUT: function, self, parent, static)
Similarities :
both of them are class members
both of them are accessible with "self" keyword inside the class
by Valeri Tandilashvili
4 years ago
PHP
OOP
2
Pro tip: use ```triple backticks around text``` to write in code fences