User and Developer Manual
Both the user and the developer manual are available in the same
document. The latest version (0.3.0) is available to download (PDF or HTML) or online. We don't
recommend any other version, though previous versions are archived.
- how to configure, compile, install, and test phc,
- how to use phc's XML
output, and phc's command line
- how to create plugins to analyse or manipulate PHP
- how to modify phc's
Design and Implementation of a PHP Compiler Front-end.
Edsko de Vries and John Gilbert.
- A technical report describing the phc
front-end, including its strategy for lexing, parsing and
unparsing, and the design of its AST.
Processing ASTs in C++: maketea.
Edsko de Vries, John Gilbert and David M Abrahamson.
A short paper, describing maketea and the AST visitors and
A Practical Solution for Scripting Language Compilers.
Paul Biggar, Edsko de Vries, and David Gregg.
A paper describing the integration of the PHP embed SAPI with
phc, in particular for
supporting PHP's semantics, and for code generation.
Compiling and Optimizing Scripting Languages.
Paul Biggar and David Gregg.
slides with notes)
A talk giving an overview of phc, its code-generation and
integration with the PHP embed SAPI, and the
optimization framework being developed on the
Writing a Reentrant Parser with Flex and Bison.
Edsko de Vries.
Writing a Reentrant Parser with Flex and Bison explains by
means of an example how to create a reentrant parser with
Flex and Bison, and how to use more than one parser in one
Memory Layout for Multiple and Virtual Inheritance.
Edsko de Vries.
Programmers wishing to enhance their knowledge of C++
might find Memory Layout for Multiple and Virtual
Inheritance an interesting article. It explains the
difficulties C++ compilers face when deciding the
(runtime) layout for objects in the presence of multiple
inheritance, and the consequences this has for
Research Papers using phc
Efficient Static Check of Tainted Variable Attacks.
Rimsa, A., d'Amorim, M., and Pereira, F. Q. In SBLP 2010.
A paper describing a technique that finds tainted flow vulnerabilities. It uses this method, implemented on top of phc, to search for XSS attacks.