Home > Article > Backend Development > When are PHP static methods and non-static methods used?
When are PHP static methods and non-static methods used?
Non-static methods are often used, but when should we use non-static methods?
When are PHP static methods and non-static methods used?
Non-static methods are often used, but when should we use non-static methods?
It’s easy to understand. If you can pick it up and use it, use static implementation, such as tool class.
If you want to use a hammer, you can’t first take a hammer mold and make the hammer and then use it. That’s what it means.