[wp-hackers] concatinating PHP code files

Arlen Beiler arlenbee at gmail.com
Mon Mar 22 18:40:25 UTC 2010


The main thing would be that it would make searching easier. However, for
something like Wordpress, you would have a file so big that only something
like Microsoft Word or a web browser could handle it.

On Mon, Mar 22, 2010 at 2:37 PM, Chris Jean <gaarai at gaarai.com> wrote:

> I don't know of anything that does this. I'm really curious to know why you
> would want to.
>
> If you only needed to do it once, just manually merge them (though I still
> don't know why you'd want to). If it needed to handle random code in an
> automated fashion, what application would require this?
>
> If you really needed this, it sounds like you would want to build a custom
> script that uses regex (http://www.regular-expressions.info/) to parse the
> files in order to find the include, include_once, require, require_once
> instances and replace them with the content of the files. Of course, if
> include_once or require_once is used, log the file so it is only included
> once.
>
> Chris Jean (AKA gaarai & chrisbliss18)
> Coder for http://ithemes.com/
> http://gaarai.com/
> @chrisjean
>
>
>
> Arlen Beiler 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
>>
>>
> _______________________________________________
> 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