language integration: php vs. perl vs. java vs. python vs. c#

php.internals

Enrico Weigelt

22 years ago
Hi folks, I'm currently thinking about ways to integrate several other languages beside php into the zend engine. For example perl and php seem to be quite similar. Some perl experts told me, there're some things in perl which php semantically does not support, especially for OPP, but perhaps these come w/ php-5 ? And what's w/ other languages, like java (at least source code, not binary). Does PHP-5 already provide packages, interfaces and exceptions ? Could packages probably be emulated by the parser. For java integration it would be interesting if higher-level-classes (i.e. hashes) could be directly handled by zend's features or extensions (i.e. database connections, SSL, ...), instead of pure java implementations and so it would also be quite fast. And what's w/ python ? I never really used it, but on some quick looks, it seems sementically similar to java (but different syntax) Would this be possible / useful ? Am I perhaps missing or misunderstandung something ? regards,
-- --------------------------------------------------------------------- Enrico Weigelt == metux IT services phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact@metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL-Zugang ab 0 Euro. -- statische IP -- UUCP -- Hosting -- ---------------------------------------------------------------------

Adam Maccabee Trachtenberg

22 years ago
On Fri, 16 Apr 2004, Enrico Weigelt wrote:
> For example perl and php seem to be quite similar. Some perl > experts told me, there're some things in perl which php semantically > does not support, especially for OPP, but perhaps these come w/ php-5 ?
See http://www.zend.com/php5/articles/php5-perl.php -adam
-- adam@trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today!

Derick Rethans

22 years ago
On Fri, 16 Apr 2004, Enrico Weigelt wrote:
> I'm currently thinking about ways to integrate several other > languages beside php into the zend engine. > > For example perl and php seem to be quite similar. Some perl > experts told me, there're some things in perl which php semantically > does not support, especially for OPP, but perhaps these come w/ php-5 ? > > And what's w/ other languages, like java (at least source code, > not binary). Does PHP-5 already provide packages, interfaces and > exceptions ? Could packages probably be emulated by the parser.
Perhaps it's a good idea to do some research what features PHP has first before asking those basic questions.
> For java integration it would be interesting if higher-level-classes > (i.e. hashes) could be directly handled by zend's features or > extensions (i.e. database connections, SSL, ...), instead of pure > java implementations and so it would also be quite fast.
Reimplementing all those things really sounds like a good idea; not.
> Would this be possible / useful ?
Possible, perhaps, but definitely not in the same engine that is also powering PHP at the same time; useful, imo not at all. You have java to use java, and python to do python, and the zend engine to do PHP. That's how it works, and should be. regards, Derick