PHPPre is a preprocessor operating on PHP source code before deployment. It was written as internal task of Phing.
Preprocessor can be used to:
- conditional insertion of blocks of code
- conditional source file inclusion
- informing about errors and warnings in configuration
- setting configuration
Currently supports directives:
- Control:
- #if SIMPLE_EXPRESSION
- #ifdef DEFINITION
- #ifndef DEFINITION
- #else
- #endif
- #elif SIMPLE_EXPRESSION
- #elifdef DEFINITION
- #elifndef DEFINITION
- Message:
- #error
- #message
- #warning
Work in progress:
Future releases:
- Definition:
- #define
- #undef
- Includes:
- #include "filename.php"
- #include <filename.php>
<target name="preprocessing">
<phppre>
<fileset dir="../project/">
<include name="**/*.php" />
</fileset>
</phppre>
</target>
Available at github repository wiki.
This software is licensed under GNU LGPL v3. You may find the terms in the "LICENSE" file in this directory.