phc logo

Latest News (older news)

15 February 2009. phc version 0.2.0.3 (ChangeLog) has been released. It resolved a packaging error in version 0.2.0.2 which prevented phc from building if the PHP embed SAPI was not used. We also repackaged 0.2.0.2 to fix the problem.

What is phc?

phc is an open source compiler for PHP with support for plugins. In addition, it can be used to pretty-print or obfuscate PHP code, as a framework for developing applications that process PHP scripts, or to convert PHP into XML and back, enabling processing of PHP scripts using XML tools.

phc for PHP programmers (See Manual):

  • Compile PHP source into an (optimized) executable (supports entire PHP standard library).
  • Compile a web application into an (optimized) extension (supports entire PHP standard library).
  • Pretty-print PHP code.
  • Obfuscate PHP code (--obfuscate flag - experimental).
  • Combine many php scripts into a single file (--include flag - experimental).
  • Optimize PHP code using classical compiler optimizations (in the dataflow branch - very experimental).

phc for tools developers (See Developers and Contributors):

  • Analyse, modify or refactor PHP scripts using C++ plugins.
  • Convert PHP into a well-defined XML format, process it with your own tools, and convert it back to PHP.
  • Operate on ASTs, simplified ASTs, or 3-address code.
  • Analyse or optimize PHP code using an SSA-based IR (in the dataflow branch - very experimental).

Recent project activity:

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

r3339 | paul.biggar@gmail.com | 2010-09-03 09:15:20 | dataflow

Hand-merge remaining differences between trunk and dataflow.

r3338 | paul.biggar@gmail.com | 2010-09-03 09:12:51 | dataflow

Update to bison 2.4.1, regenerate parser.

r3337 | paul.biggar@gmail.com | 2010-09-03 09:11:44 | dataflow

Debian keeps moving where the acarchive stuff is kept. Support another location.

r3336 | paul.biggar@gmail.com | 2010-09-03 09:11:03 | dataflow

Make sure tests actually finish.

r3335 | logytech | 2010-08-26 17:14:06 | dataflow

Fixed a missing case in 'parse_url'.

r3334 | logytech | 2010-08-26 02:00:04 | dataflow

Added support for constant values in default function parameters. A test is also provided. Now we can have something like this:

<?php function f($v=CONSTANT) { var_dump($v); } ?>

r3333 | logytech | 2010-08-26 01:49:43 | dataflow

Modelled 'parse_url' function. I may have modelled too many details, but the function can return different values for several scenarios.