Posted by Veikko M�kinen on 10/15/94 11:17
What's the most efficient way to avoid using require_once (it seems to
be really slow on my machine). A good design is always a good start but
keeping track of every file that needs to include other files, is just
too demanding. I've seen people using c-style harnesses like this:
<?php
if(!defined('_MYCLASS_'))
{
define('_MYCLASS_', 1);
class MyClass { ... }
} //!defined
but 'defined' can be slow too (I'm profiling my application execution
with APD).
How do you avoid re-definition of your classess? require_once, define
harness, own file import hack or what? Thanks.
-veikko
--
veikko
mail@ .com
makinen
[Back to original message]
|