as I read your mail one silly thing came into my mind: 

You can try to load all those classes as texts into a db and then to execute 
the needed ones as eval()ed strings. It could be easy for you to create the 
logic because the PHP code are stings and are never included but SELECTed. 
Not sure if this could be wise to do, just throwing out an idea. 


Maxim Maletsky 

Founder, Chief Developer (Where PHP Begins)

Arpad Tamas writes: 

> Hi Everyone! 
> I have an idea, but I don't know how to realise it, if it can be at 
> all.
> We have a relatively big system, with 52k lines of php code without 
> much html, and many classes (1138) that depend on each other.
> And I think I don't need to say that php parses the code somewhat 
> slow. That's what I'm trying to solve. I know there are code caches, 
> but none of them suits all of our customers or our needs (price, 
> effectiveness).
> Of course not all classes are needed on every page request, so I'm 
> trying to separate them, and require them when they are really 
> needed, but that's not easy with 1100 classes. 
> So I thought I'd write a custom error handler, and when an unloaded 
> class is created or it's static method is accessed an error would 
> be triggered and I'd require it in the error handler. The "only" 
> problem is, that after the error handler finished the main code is 
> executed *after* the "statement" that triggered the error, so I can't 
> tell php to give one more try for the previously faulty code. 
> Is there any chance for this to work with some trick, or do you know 
> of a better sollution for the problem? 
> Thanks for your help, 
>       Arpi 
> -- 
> PHP General Mailing List (
> To unsubscribe, visit: 

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to