phrep

Update of "alternatives"
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: a82680f5863b242bbcc4f34e51235ee722ff5678
Page Name:alternatives
Date: 2015-03-06 17:42:12
Original User: mario
Mimetype:text/x-markdown
Parent: 9a6c8afb2f4b8e7460136680b4646b0d6a5f2dcb
Content

There are other preprocessor implementions for / or usable with PHP.

phpp

PHPP is meant for PHP scripts of course.

Quite apt for joining PHP apps.

CCPP

CCPP is an earlier C-preprocessor implementation for PHP.

It's just a library though, not being updated since.

Preprocess.py

preprocess is a very generic file preprocessor implemented in Python.

It's available in most distros per default.

other PHP-specific processors

Don't refrain from adding a comment if you know of another implementation.

GPP (General-Purpose Preprocessor)

GPP is similar to the C preprocessor, but provides a few abstractions and flexibility over CPP and M4.

It's not an active project anymore, but still functional, readily available in all distros.

CPP (GNU or Clang)

Theoretically one could use plain cpp for preprocessing other source files. It's quite the command-line though:

gcc -E -P -w -ansi -traditional-cpp -no-integrated-cpp -nostdinc -iconfig.h file.php

CPP however is too strongly tied to C/C++ and will trip over literal # comments, and often butcher up the rest (stripping comments is useless outside of C compiling tasks).