View Single Post
12-11-2005, 10:37 PM
#4
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

Excuse me, but I don't understand what you mean by "more proffesional". How does one rate the "proffesionalness" of a PHP code snippet?

Anyway, in my view it would be much simpler to have the close method called automatically (by default, with the option to turn it off for custom close positions) than relying on the developer to always place it at the end of the script. Plus, the person learning from the article could then see where and why the register_shutdown_function function is useful.

What could be simpler than adding $Cache = new Cache(); to the top of the page and leaving it at that?