If ZF is used, it is equal to loadzf's mvc framework every time. I am sorry, I used to work on J2EE. I just got started with PHP. some things are not very understandable. Because PHP cannot be regarded as a let running in the Container, it maintains the same object lifecycle as the request, even sessions are implemented by serializing and transforming them into files on the persistent layer. Is this correct? Therefore, unlike J2EE, using ZF in the entire Containe is equivalent to loading the zf mvc framework every time.
Sorry, I used to work on J2EE. I just got in touch with PHP. some things are not very understandable.
Because PHP cannot be regarded as a let running in the Container, it maintains the same object lifecycle as the request, even sessions are implemented by serializing and transforming them into files on the persistent layer.
Is this correct?
Therefore, unlike J2EE, in the entire Container lifecycle, the framework configuration can be read only once (similar to application. ini), the master object of the framework can be generated only once (similar to Zend_Application), and in PHP, All requests must be initialized once.
Will this not cause efficiency problems? Especially for a framework like ZF, it must be slower than PHP without a framework?
Or do you know what other configuration methods can make the above process be executed only once?
------ Solution --------------------
You still said you don't understand it. you understand it very well :)
This PHP is designed in this way, so there is no thorough solution ....
This is also because of the design, so the impact of this problem on efficiency is not as serious as imagined...
(Maybe php is not as good as J2EE in some cases)
The specific understanding should be found in zend engine, but the manual here focuses on the blank :(
Http://www.php.net/manual/en/internals2.php
Some cache libraries can be improved to some extent, see http://www.php.net/manual/en/refs.basic.php.php
It seems that some experimental PHP variants attempt to imitate J2EE.
------ Solution --------------------
Completely correct
In this way, php can be connected to any web server.
Any attempt to improve the php running mechanism will reduce the application scope of php.