7

have someone used quercus to translate php into bytecode? if you got a big php application, will the translation be flawless? it sounds to me very impossible to just translate everything without error in code like that.

but they claim on their web page that mediawiki and other popular websites (joomla to i think) use it.

and my php code got a lot of procedural code. how will that be translated to a class in java? sounds very impossible!

it would be good if it was true. someone that has tried it?

ajsie
  • 77,632
  • 106
  • 276
  • 381
  • 1
    It's perfectly possible... it's just a compiler. I have no idea how good the implementation is, but in principle, no problem. – Andrew McGregor Jan 13 '10 at 09:41
  • In my opinion, converting languages sounds like a bad idea. just write again ... – Michel Gokan Khan Jan 13 '10 at 09:49
  • @andrew: but it compiles to java bytecode. isnt it kind of translating to java? @michael...i will rewrite the code in the future in pure java, but i don´t have time for that right now cause the deadline is near=) – ajsie Jan 13 '10 at 09:58
  • 2
    java byte code is not the same as java source code. – troelskn Jan 13 '10 at 11:21
  • 1
    I know of a PHP implementation by IBM: it compiles PHP sources on-the-fly to Java bytecode too. And that seems too work; so if Quercus is also a good implemenation, it should work. I'm convinced of the theory, by seeing IBM's implementation, that it should work. – Pindatjuh Jan 19 '10 at 14:47
  • it worked very good. except for some things you have to rewrite and the mysql connection is 4 times slower than with apache. but the code runs 4-5 times faster. – ajsie Jan 21 '10 at 05:28

2 Answers2

2

this guy has drupal running on quercus. drupal makes very little use of oop and yet it seems to be running fine under quercus. apparently there are even some performance benefits of doing it this way - probably associated with the difference between compiled code vs interpreted code.

Peter Carrero
  • 1,596
  • 2
  • 13
  • 13
0

Seems like a hard way of optimising, why not run APC? you'll get similar performance benefits.

jhogendorn
  • 5,931
  • 3
  • 26
  • 35