sneskid Posted April 13, 2006 Share Posted April 13, 2006 I've been needing some insight as to how PHP scripts are handled after they are "compiled" and so forth.Here is a prolonged scenario... mostly how I understand PHP to currently work, or I should say the code behind the scenes that makes PHP work.terms:Let Access(name.php) mean someone from the web has accessed the file in the bracketsLet [#] represent an instance of the scriptLet Finish[#] mean the script finaly finished runningLet Update(name.php) mean that script was changed somehowLet - represent a statement to describe the scenarioLet * represent an actionLet ? represent a question I have== The Scenario ==- We just uploaded a PHP file called "snes.php"*Access(snes.php) [1]- This is the first time snes.php is accessed, so it will get compiled by the zend engine, then it should be in memory.*Finish[1]*Access(snes.php) [2]- This time snes.php is already in memory, so it starts to do what it has to do quicker.? Is Zend informed when a file is updated or does it check the file every time someone accesses it- Due to requests user [2] made, snes.php will run a loop that may take a few seconds to complete.*Update(snes.php)- I make snes.php include another file called "kid.php"*Access(snes.php) [3]- The zend engine recognizes snes.php was altered, so it recompiles it.- The zend engine also compiles kid.php because it is included by snes.php.- a few seconds pass? What happens to instance [2] that ran during this time? would it just live out it's course? or is the process somehow interrupted.*Finish[2]*Finish[3]*Access(snes.php) [4]- user[4] has made some requests that make snes.php run for a few seconds.* Update(kid.php)- We made snes.php smart, so it knows if kid.php has been updated, and it can decide to re-include kid.php? is "re-including" even possible?? what happens to class objects that already existed and became available from an older include? will PHP recompile kid.php again for instance [4] of snes.php, or just use what's in memory from before*Finish[4]== Thanks == Link to comment https://forums.phpfreaks.com/topic/7284-php-insight/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.