Question about include ...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Question about include ...

Post by neophyte »

Does php retain frequently accessed files in memory when the file is included (include(), include_once(), require(), require_once()) or is it flushed at the end of execution? I'm not talking about including the same file twice during a single execution. I'm saying page executes, file x is included, execution completes -- is file x pulled raw from the file system again on the next execution or is it pulled from memory/cache? If so is there a performance difference?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Stateless.

It remembers nothing of the previous runs.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

That's what I thought....

Do accelerator's store that stuff as byte code?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

maybe asking in the zend forums would make more sense... seems like a plumbing question!
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

There are other accelerators besides Zend...
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Seems to me that the engine itself might be responsible for some caching...
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

neophyte wrote:There are other accelerators besides Zend...
Yep APC, APD, eAccelerator to name a few.
Post Reply