Robert has several years of professional experience and a PhD in the field of automated software migrations. He is the co-founder and CEO of Numition Ltd., a start-up company specialized in developing software migrators. Robert is a DZone MVB and is not an employee of DZone and has posted 10 posts at DZone. You can read more from them at their website. View Full User Profile

Automated translations from PHP to Java

  • submit to reddit
Numiton offers an automated alternative to migrating PHP codebase. This way, established applications can benefit from the advantages offered by Java in its enterprise-level capacity.

Some of the risks inherent to any software migration are avoided by using an automated translation tool. Our PHPtoJava product performs variable type inference, objectualization and other operations in a uniform manner, the resulting appearance and behavior being identical to what the users already know.

Of course, the human factor still plays an important role in the post-translation phases: application fine-tuning and functional testing. The speed and accuracy of the entire process surpass however those of a manual translation.

One of the applications we have migrated this way is the well-known forum engine phpBB. The translation result, nBB2, powers our own forum and was recently donated to the open-source community as a SourceForge project.
Average: 1 (1 vote)
Published at DZone with permission of Robert Enyedi, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Ray Cromwell replied on Wed, 2008/03/05 - 6:53am


Caucho's Quercus (in Resin PRO) already provides compilation of PHP to Java, and I notice that you're actually using Quercus for some stuff, so how does your product differ from Resin Pro, can you show advantages or performance differences?


Robert Enyedi replied on Wed, 2008/03/05 - 7:26am

The main difference is that Caucho leaves the PHP source code as is and runs it inside the Java VM.
What PHPtoJava does is translating all PHP code to Java source code. From here on it can be maintained and developed as a regular Java application. A few more ideas about this are listed at

Inside nBB2, Quercus is an optional component used for a few runtime calls. This is mostly for tricky PHP functions like regexp ones. We have noticed that Java shared hosting restrictions prevent our own runtime from functioning properly - and we assume that nBB2 might be deployed on such a budget-friendly environment. This is work in progress though, only on a CVS branch and without any releases yet.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.