[phc-general] view source
logytech at gmail.com
Tue Oct 26 01:40:08 IST 2010
It is indeed possible to convert the PHP program to C source with phc.
You can try it yourself, as long as you compile phc with PHP embed
$ phc --generate-c file.php > file.c
Unfortunately, the generated code is not quite human readable. It
translates PHP instruction to respective PHP libraries C wrappers
making it quite difficult to understand.
Maybe a better fit for you is the HIPHOP compiler. I haven't yet
looked at it, but it is supposed to generate C++ code out of PHP. A
discussion between the phc approach and the HIPHOP can be found on
Paul's blog: http://blog.paulbiggar.com/archive/a-rant-about-php-compilers-in-general-and-hiphop-in-particular
. More about HIPHOP can be found on:
I hope you decided for phc afterall. It is a great PHP compiler. (;
On Mon, Oct 25, 2010 at 10:10 PM, vash cs <vashrf at gmail.com> wrote:
> Is there a way to convert the php source to c source? Specifically, is the
> c source human readable? If not, is there a way to make the c source human
> readable? I want to convert my php code to c and work from the c source
> from now on.
> phc-general mailing list
> phc-general at phpcompiler.org
More information about the phc-general