If there is no mutual relationship between methods in a class, that is, when the State is not maintained, can all methods be changed to static methods? Is it necessary for multiple PHP users to access a class multiple times at the same time? If new is used for multiple times, isn't it resource-consuming? static ?...
- If there is no mutual relationship between methods in a class, that is, when the State is not maintained, can all methods be changed to static methods?
- Is it necessary for multiple PHP users to access a class multiple times at the same time? If new is used for multiple times, isn't it resource-consuming or static?
- Thank you for your speech. You have answered several questions I have previously asked. If you know, please help your younger brother to answer your questions.
Reply content:
- If there is no mutual relationship between methods in a class, that is, when the State is not maintained, can all methods be changed to static methods?
- Is it necessary for multiple PHP users to access a class multiple times at the same time? If new is used for multiple times, isn't it resource-consuming or static?
- Thank you for your speech. You have answered several questions I have previously asked. If you know, please help your younger brother to answer your questions.
- Yes
- Yes, no (even if it is static, it will not be shared among multiple accesses, and each request will be new separately, but it will not be new multiple times during one request processing)