Forum OpenACS Development: Re: Tcl calls from PHP?
Or is there more to it that I'm missing here? In practice, why would a Tcl caller ever care about the fact that PHP has no persistent state at all?
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.