[phc-general] view source
Andrei Alvares
logytech at gmail.com
Tue Oct 26 01:40:08 IST 2010
Hello Adam,
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
SAPI (http://www.phpcompiler.org/doc/latest/install.html):
$ 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:
http://github.com/facebook/hiphop-php/wiki .
I hope you decided for phc afterall. It is a great PHP compiler. (;
Best regards,
Andrei
On Mon, Oct 25, 2010 at 10:10 PM, vash cs <vashrf at gmail.com> wrote:
> hi,
>
> 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.
>
> thanks,
> Adam
> _______________________________________________
> phc-general mailing list
> phc-general at phpcompiler.org
> https://nova.villiros.com/cgi-bin/mailman/listinfo/phc-general
>
More information about the phc-general
mailing list