1

Possible Duplicate:
What’s the difference between :: (double colon) and -> (arrow) in PHP?

I have seen in examples across the web people using the Fat Free Framework both ways, ie:

echo $f3->get('varname');

vs.

echo F3::get('varname');

Obviously, both work. Which is better and why?

Community
  • 1
  • 1
ethanpil
  • 2,522
  • 2
  • 24
  • 34
  • I am asking for advice specific to this particular framework, however, it is slightly similar to the referenced question, yet in my opinion specific enough to the application to warrant a specific answer. – ethanpil Feb 03 '13 at 08:03

1 Answers1

1

Either way works, just depends on your setup. The later versions of Fat-free tend to use static variables and functions, and that is usually what is shown in the docs online. Again, up to you. Either way works just fine. Using static versions allow you to access the functions and variables globally, which is why I use the static version.

Tim Withers
  • 12,072
  • 5
  • 43
  • 67