Re: PHP compiler
Hello,
On 03/08/2004 05:34 PM, CountScubula wrote:[color=blue][color=green]
>>No. See, you didn't understand my question correctly. I don't actually
>>need a PHP compiler, what I need is an *information* wether that
>>compiler exists. And why's that? Becouse my team and I might be doing a
>>PHP compiler as a student project for my Comiler Design course at
>>University (I, as a group leader, have 10 people and 4 months on my
>>hands to build a comiler of my own). So, it would be very nice to have
>>"nobody did it before" in my project documentation. And I can write that
>>if I'm not sure, right?[/color]
>
>
> If I may say, if you have never written a compiler before, do attempt a php
> compiler, stick to a language that is more suited for compiling.
>
> PHP has too many functions, that can limit compiling, for example, the
> require() function can be used like a C-style include, and compiled, but you
> lose out on the include() function, becouse a lot of time people need to
> include editable (such as forms erc..) files at run time, therefore those
> files can not be compiled. Actualy even some require() files can not be
> compiled, becouse they contain config variables that need to be editied by
> the user.[/color]
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.
Actually, the compiler could be Just In Time (JIT) and be transparently
integrated in the PHP runtime execution for maximizing the performance
and keeping the flexibility.
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
PHP Reviews - Reviews of PHP books and other products
Metastorage - Data object relational mapping layer generator
Hello,
On 03/08/2004 05:34 PM, CountScubula wrote:[color=blue][color=green]
>>No. See, you didn't understand my question correctly. I don't actually
>>need a PHP compiler, what I need is an *information* wether that
>>compiler exists. And why's that? Becouse my team and I might be doing a
>>PHP compiler as a student project for my Comiler Design course at
>>University (I, as a group leader, have 10 people and 4 months on my
>>hands to build a comiler of my own). So, it would be very nice to have
>>"nobody did it before" in my project documentation. And I can write that
>>if I'm not sure, right?[/color]
>
>
> If I may say, if you have never written a compiler before, do attempt a php
> compiler, stick to a language that is more suited for compiling.
>
> PHP has too many functions, that can limit compiling, for example, the
> require() function can be used like a C-style include, and compiled, but you
> lose out on the include() function, becouse a lot of time people need to
> include editable (such as forms erc..) files at run time, therefore those
> files can not be compiled. Actualy even some require() files can not be
> compiled, becouse they contain config variables that need to be editied by
> the user.[/color]
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.
Actually, the compiler could be Just In Time (JIT) and be transparently
integrated in the PHP runtime execution for maximizing the performance
and keeping the flexibility.
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
PHP Reviews - Reviews of PHP books and other products
Metastorage - Data object relational mapping layer generator
Comment