The Fastcgi scheduling thread parses php. Is the static attribute (memory) in PHP between threads shared? Because fastcgi runs a php script, the memory will not be released for the time being, and will be scheduled to process the next request. Then, the static variable storage value after php runs will be obtained in the next php... the Fastcgi scheduling thread parses php. Is the static attribute (memory) in PHP between threads shared? Because fastcgi runs a php script, the memory will not be released for the time being and will be scheduled to process the next request. Will the static variable storage value after php run be obtained from the next php?
For example
Class A {public statis $ var; public static function init () {$ var + = 1 ;}} A: init ();
Next php RuntimeA: init ();
, Is the value of $ var 1 or 2?
Reply content:
The Fastcgi scheduling thread parses php. Is the static attribute (memory) in PHP between threads shared? Because fastcgi runs a php script, the memory will not be released for the time being and will be scheduled to process the next request. Will the static variable storage value after php run be obtained from the next php?
For example
Class A {public statis $ var; public static function init () {$ var + = 1 ;}} A: init ();
Next php RuntimeA: init ();
, Is the value of $ var 1 or 2?
If Php is combined with nginx, It is managed through fpm. It is a multi-process model and memory cannot be shared between processes. So, you know