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 149 commits in the last 7 days. Most recent:

r3101 | paul.biggar | 2009-07-03 22:47:08 | dataflow

Make Maps copy-on-write. This saves about 15% of run-time.

r3100 | paul.biggar | 2009-07-03 18:36:04 | dataflow

Re-org of the test_benches.

r3099 | jimmehc | 2009-07-03 16:21:44 | dataflow

Collect stats for number of possible receivers (monomorphic vs polymorphic follows from this) and total number of call sites.

r3098 | jimmehc | 2009-07-03 16:19:33 | dataflow

Change the name of Alias_name's 'get_key ()' function to 'non_ssa_str ()'

r3097 | jimmehc | 2009-07-03 13:44:03 | dataflow

Remove conversion to non-SSA form in RLB, no need, it's already ensured in the pass manager.

r3096 | jimmehc | 2009-07-03 13:35:49 | dataflow

Make sure RLB is only exectuted on temporary (compiler generated) variables.

r3095 | jimmehc | 2009-07-03 11:15:28 | dataflow

Implement Remove Loop Booleans.

Fix a small typo in If simplification (that I'm surprised wasn't segfaulting...)