On 10.07.2008, at 14:43, Richard Krehbiel wrote:
Here's the big part: I was thinking that a semantic change to
persistent
sockets might make it easier for scripts to work "correctly" without
bothering them too much. The change is this: If a script doesn't
"fclose"
it's "pfsockopen"ed socket, it gets closed *for real* when the
script ends.
I suggest this because I think it would make scripts "just work" in
the
presence of failures, even if the script coder doesn't completely
understand
the principle; it makes the transaction boundaries "automatic". The
down
side is that, if a script forgets the fclose, things work but it
doesn't
recycle sockets, it makes new ones all the time.
The other down side is that for old scripts that never had an fclose
in
them, they stop getting recycled pfsockets until the fclose is added.
I'm going to do *something* about this myself, anyway. I'd really
like it
if a solution were adopted into the main code base.
I think this might generally be a solution to make persistent
connections less error prone in PHP. This includes database extensions
as well. However it does strike me as something that should be done in
a major PHP version ..
regards,
Lukas Kahwe Smith
[EMAIL PROTECTED]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php