Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
the function simply returns an instance of the class, not a class. what is unclear here? there were PHP versions where such a call was generally prohibited.
class App {
public function getLocale();
}
function app {
return new App(); // в вашем примере тут синглтон
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question