[wp-hackers] concatinating PHP code files

Otto otto at ottodestruct.com
Mon Mar 22 19:56:08 UTC 2010


Amazingly enough, that's actually not simple because of the
include_once and require_once commands. Those can't be evaluated until
the actual runtime, because different conditional values can change
the order things are loaded in. So, you need extra code just to keep
track of what is "loaded" for those to be run at the right times. So
it's more complex than a simple replacement, basically.

-Otto



On Mon, Mar 22, 2010 at 1:16 PM, Arlen Beiler <arlenbee at gmail.com> wrote:
> Is there a way to specify a start file and have php build a new file out of
> the inludes and requires it finds? Say I have 5 files, #1 includes the other
> 4 at runtime. Can I have it take the code in those other files and insert it
> where the include is the way PHP does when it runs?
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list