Home | Downloads | Documentation | Plugins | Spinoff Projects | Mailing List

What is phc?

phc is a framework for static analysis of PHP scripts, PHP source to source transformations, and ultimately compiling PHP scripts down to native machine code.

The current release does not yet compile PHP and is therefore not yet useful for end-users. It is however useful for writing tools that operate on PHP scripts, such as refactoring tools, aspect weavers, or obfuscators (see Spinoffs for some other suggestions). See What's in Store to get an idea of what is planned for next releases of phc.

phc provides the programmer with a well-defined representation of PHP scripts (an abstract syntax tree or AST), an API to define analyses and transformations over this representation, and an unparser to output the AST back to PHP syntax. In addition, import and export of XML is supported. See the Demo for a quick idea of what phc can do for you, or the Documentation to get started with phc.

Most recent subversion log

We are working hard on getting code generation done. Here are the most recent logs from our svn repository.

There were 49 commits in the last 7 days. Most recent:

r1441 | paul.biggar | 2008-07-06 19:16:41 +0100 (Sun, 06 Jul 2008) | 2 lines

Remove Reflection from the HIR and MIR, replacing it with Variable_method and Variable_class.

r1440 | paul.biggar | 2008-07-05 19:44:57 +0100 (Sat, 05 Jul 2008) | 2 lines

Remove Foreign_statement and Foreign_expr from each of the IRs. With None, its possible to compile the folds without errors, with just Foreign.

r1439 | paul.biggar | 2008-07-05 16:21:22 +0100 (Sat, 05 Jul 2008) | 2 lines

Re-organize *_to_* classes, primarily to make them easier to diff against each other.

Contact Us

We are more than happy to answer any questions about phc. So please do not hesitate to join the phc mailing list, where we will try our best to answer any queries as quickly as we can. You can join below.

Email

News

17 January 2007. The phc SVN repository is now publicly available. Read the announcement for more details.

8 September 2006. We are delighted to announce the first spin-off based on phc. Written by Daniel Barreiro, it embeds HTML/XML into PHP. See spinoffs for details. In further news, we have released version 0.1.7 as no major programs were reported in 0.1.7rc2, and we have added a new article on writing a reentrant parser with Bison and Flex.

See the news archive for older news.

$LastChangedDate: 2007-10-02 11:08:00 +0000 (Tue, 02 Oct 2007) $. Contents © the authors.