W
W
WEWMEGADUV2016-07-13 11:57:00
PHP
WEWMEGADUV, 2016-07-13 11:57:00

When should you declare class methods as static?

I know how static methods work, but I don't know why they are created? what is a static function for?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2016-07-13
@miraage

Never, except when this method is a factory/singleton.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question