Jump to content

Static methods


alecks

Recommended Posts

Whats the point of having static methods then?

 

Static methods are useful when you need some functionality, but don't need an object afterwards.  Factories often use static methods because most people want the object created by the factory, not the factory itself.  There was a larger conversation about this here: http://www.phpfreaks.com/forums/index.php/topic,206892.0.html

Link to comment
https://forums.phpfreaks.com/topic/115352-static-methods/#findComment-593589
Share on other sites

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.