When does the php static method start to occupy the memory? For example, I have considered the following situations for a class {code...}: when executing php code, I will scan static methods. whether there is any include., it should not be used if the efficiency is too low. When I include & #039; Test. php & #039;, when will the static method of... php start to occupy the memory? For example, a class
Class Test {public static function test1 () {} public static function test2 (){}...}
I have considered the following situations:
When executing php code, scan static methods, whether or not include., Should not be used if the efficiency is too low.
In myInclude 'test. php'
Will it scan the class and load the static method into the memory. At this time, all methods should be loaded into the memory.
Assume that2
If not, is the method called?Test: test1 ();
When loading the data into the memory, will it load only the current method or all the static methods of the current class at this time?
Will different php processes share static methods? For example
Here there is a great God said Nginx and Php-fpm processes and threads: https://segmentfault.com/q/10...
If so, a Php-fpm process serves a client. but if the concurrency is too high, won't there be many processes? According to process communication, requests from different clients belong to different processes and should not affect each other. There should be a static method cache in the memory occupied by the process, however, if a client has multiple requests and read the article as a blocking single-threaded model, each request should be executed only after the previous request is completed, will the static method cache be clear at this time, or will it be saved? If it is cleared, the static method will not be shared.