Arno Kuhl wrote:
We really are talking across each other. If you read my post properly you would have noticed that I was asking why the include/require doesn't work like the _once by default, not why there is a _once (which is obviously the way you understood it). The application I work on has more than 200,000 lines of code in total, and there isn't a single instance in which I have ever needed to include a file more than once. I have looked at many code projects and code samples over the last five years, and read several PHP books, and I haven't seen a single case where a file was included more than once, so I'll ask again: why doesn't include/require work like include_once/require_once by default? (And btw, I do actually understand complex PHP code, where included functions can include other includes, especially when you start coding the application-wide API functions.)
I have a template class that can use require to include the same file several times during one request. If it only did it once and then ignored the others most of the interface on my sites would look very odd.
Your understanding of complex PHP code has clearly blinded you to the bleeding obvious. But yes, I apologise for not reading your question properly in the first place.
-Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php