ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-general
php-general
[PHP] How php works?
by Kai Xiang other posts by this author
Dec 12 2006 10:17PM messages near this date
RE: FW: [PHP] Re: Please hack my app | Re: [PHP] How php works?
Hello all:

I'm new here and looking PHP these days, howerver , I'm confused by how it
works, and here is some questions I have.
Is there any old bird wanna help me out?

1. I heard there is a zend engine inside PHP playing the role as a virtual
machine, and PHP excution have 2 step, first compile to opcode and then
excute the opcode,
so is that means the php are compiled only once per file? or still need to
recompile when another request issued to the server? also I heard about the
caching extention about php, is it talking about caching the opcode? is't
caching the opcode or excute results? how it shares between the requests?

2. Is there some alternative choise except zend engineen, why need a zend
engine? for performance advantage or just easy for porting to different
platform?

3. Take linux apache for example, if compiled as a apache module, and using
prefork threading model, for example, if I have 100 process, is that means I
have 100 copy of PHP library local data(I assume only one reentrant
excutable image) in each process? compare to a worker model, like 10 process
and 10 threads in each one process, should it make a difference that we only
have 10 copy of PHP library local data ?

I'm not sure if this is the right place to talk about this, anyway, if you
know a better place, help me out :)
Thanks in advantage

Regards
Kai
Thread:
Kai Xiang
Tedd
Kai Xiang
Jochem Maas
Kai Xiang
Roman Neuhauser
Kai Xiang
Roman Neuhauser
Jochem Maas
Kai Xiang

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved