Jump to content

Whats the deal with var in classes?


JonnySnip3r

Recommended Posts

While the var keyword can still be used, it's a sign of PHP 4's OOP mechanism.  Var gives a default visibility of public to the data member it's associated with.  You're much better off providing the appropriate visibility modifier - public, protected, or private - depending on your needs.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.