John Nichel wrote:
Jasper Bryant-Greene wrote:
<snip>
I never close connections; PHP does that for me and has never caused
any problems doing that. I don't see it as sloppy programming, it is a
documented feature that PHP closes resources such as database
connections at the end of the script.
It's extremely sloppy programming. You're assuming that a) PHP will
continue to be a forgiving language when it comes to items like this and
b) your script is going to exit normally. The reason this is a
'documented feature' is because PHP is trying to make up for sloppy
programming. You shouldn't rely on the language to clean up your toys
for you.
If the script exits abnormally the connection is still closed. Test it.
I'm happy to gamble on a) as because I have said in earlier posts I am
very confident this behaviour will not change in the forseeable future.
--
Jasper Bryant-Greene
General Manager
Album Limited
http://www.album.co.nz/ 0800 4 ALBUM
jasper@xxxxxxxxxxx 021 708 334
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php