Downloading and Usage

Getting Pharen

You can download the ZIP file from Github. If you have Git installed, you can also run:

$ git clone git://

Installing Pharen

After downloading and if needed, extracting, Pharen, cd into its directory and run:

On Unix systems:

$ sudo ./

On Windows:


Using Pharen

To use the compiler:

$ pharen your_file.phn

This will compile the contents of your_file.phn to your_file.php. Note that php should point to wherever the php executable is located if it’s not in your environment path. Also, .phn is the convention for a Pharen file extension, although you can use your own.

Adding more file names causes each file to be compiled in order:

$ pharen your_file.phn file2.phn file3.phn fileN.phn

Each file is then compiled to the equivalent PHP file, so your_file.php, file2.php, etc. The order in which you specify the files is only important when using partials and macros since the compiler stores information related to those in memory. If you’re not doing either, then you don’t have to worry about the order.