I've seen both used in documentation of a PHP library (seemingly interchangeably) and was wondering if there's a method to the madness and a time when each should be used? (Or if they mean something different, a nuance which I've therefore missed in the documentation)
Examples:
ClassName#foo() // a method
ClassName::bar() // a method
ClassName::baz // a property
I've not (yet) seen anybody try to use ClassName#qux
for a property but perhaps that's possible too!
Hopefully this thread will help to set people on the straight and narrow!
Thanks in advance
P.S. it's hard searching Google for this. "#" = "hash" = "pound" and "::" = "double colon" = "T_PAAMAYIM_NEKUDOTAYIM"... and "hash" means something all of its own too, of course.
Edit: A further question is whether it is normal/correct to document properties and variables as ClassName::foo
or ClassName::$foo
(i.e. with or without a leading $)