Bytekit
What is Bytekit?
Bytekit is a PHP extension that provides a userspace representation of the opcodes generated by the Zend engine compiler built into PHP. This extension provides not only access to the raw op_array data but also contains a Zend engine disassembler that exports control flow information in form of code flow graphs and basic blocks. Bytekit is meant as a tool to understand the internals of PHP better, to debug Zend engine error cases and as base to develop all kinds of static and dynamic code analysis tools.
Download
Bytekit v0.1.1 is available for download here.
Example Graphviz Visualisation of phpBB3's viewtopic.php - main function contains 972 basic blocks - see here (SVG version).
Documentation
A real documentation is comming soon. So long you can read the bundled examples and read the german slides from International PHP Conference 2009 - Spring Edition.
Copyright
2008-2009 © Stefan Esser <stefan.esser[at]sektioneins.de>
Bytekit is licensed under the Bytekit License 1.0
