thangappan Posted February 16, 2009 Share Posted February 16, 2009 Can anyone explain about what are the steps internally happens when one PHP program executes? Link to comment https://forums.phpfreaks.com/topic/145385-steps-of-the-php-program-or-script/ Share on other sites More sharing options...
printf Posted February 16, 2009 Share Posted February 16, 2009 It depends on type of PHP you are using. As a module the PHP startup process is loaded when the server starts. Running as CGI the startup process begins from the beginning. 1. try to load the configuration file (php.ini) if it exists 2. load zend or debug if either one or the other configured 3. try to load extensions, load the ones that can be found in (SYSTEM or php.ini include path) report the ones that cannot be loaded. // then wait for requests passed to it by the server 4. try to compile (auto_prepend_file) if it has a value and can be found (php.ini include path), fatal error if it cannot be complied or found! 5. try to compile (all the scripts needed for this request) if they can be found (php.ini include path), fatal error if they cannot be complied or found! 6. try to compile (auto_append_file) if it has a value and can be found (php.ini include path), fatal error if it cannot be complied or found! 7. execute compiled application. 8. (full stop) recompile application if a eval() is hit in the execution of the application. 9. shut down process (close IO / RESOURCES, remove memory allocation), write session data if session, do garbage collection if time for garbage collection, send exit command back to the server... Link to comment https://forums.phpfreaks.com/topic/145385-steps-of-the-php-program-or-script/#findComment-763265 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.