Forum OpenACS Development: Re: Tcl calls from PHP?

Collapse
14: Re: Tcl calls from PHP? (response to 13)
Posted by Patrick Giagnocavo on
Andrew, I don't think that is exactly the case concerning PHP.

However, what this means is that the cost of a single PHP command is thus the same as a CGI being forked.  The php.ini config file must be read, file handles opened, that sort of thing.  And you can, in fact, run PHP as a CGI.

I think the idea is not so much that PHP has persistent state, as that the cost of a PHP function be as small as a possible.  Having a persistent interpreter being around means no startup time.  Think of how having bash's builtin functions around all the time makes it easier and more efficient when you are doing things on the command line.