Re: PHP compiler
From: Manuel Lemos (mlemos_at_acm.org)
Date: 03/10/04
- Next message: Chung Leong: "Re: before eval(), how can one test a string to see if it is valid PHP code?"
- Previous message: Manuel Lemos: "Re: PHP compiler"
- In reply to: Lothar Scholz: "Re: PHP compiler"
- Next in thread: Lothar Scholz: "Re: PHP compiler"
- Reply: Lothar Scholz: "Re: PHP compiler"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 09 Mar 2004 20:24:54 -0300
On 03/09/2004 10:35 AM, Lothar Scholz wrote:
>>He never said that he wanted to develop a compiler that generates an
>>executable that works by itself. Anybody can develop a compiler that
>>links to libphp.a and the necessary parts of Zend engine. Over time the
>>compiler could be optimized to replace some PHP function calls with
>>native C code.
>>
>
>
> But i'm 100% sure that this is nothing for a university compiler
Why not?
> course. Maybe it is if you only teach the tokenizer and lexical
> parser. But this should take no longer then a month. Everything else
> is for educational things just stupid. Writing an interpreter is a
> good home work assignment, i did this with a lisp interpreter in my
> student days, but using PHP in a compiler course. Oh my Buddha, please
> help the unwise.
What you are suggestiong seems pointless. PHP engine itself since
version 4 is already a compiler that converts PHP source and byte codes.
Writing an interpreter is like going back to the slow PHP 3 days.
If anybody writes a tool that converts PHP bytecodes into C/C++ code
that when executed does the same as when the original bytecodes are
interpreted by the Zend engine, that is also a compiler tool to me. And
yes, the base project could be developed in a month much more likely
than a PHP source to binary executable project.
-- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html
- Next message: Chung Leong: "Re: before eval(), how can one test a string to see if it is valid PHP code?"
- Previous message: Manuel Lemos: "Re: PHP compiler"
- In reply to: Lothar Scholz: "Re: PHP compiler"
- Next in thread: Lothar Scholz: "Re: PHP compiler"
- Reply: Lothar Scholz: "Re: PHP compiler"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|