Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Quercus is an implementation of PHP written in Java, and released under the GPL.

If I use it, does my PHP code fall under the GPL?

What about my Java code?

Assuming I write new Java code, and new PHP code, and use Quercus to run my PHP code on the JVM and call into my Java code, which pieces fall under the GPL?

Also, assume that the result is commercial software that I want to distribute.

share|improve this question

Generally, if you start to distribute Quercus with your code, then your code will also fall under the GPL. For alternative licensing terms, you should contact their representatives.

share|improve this answer
Are you sure? imho his PHP code is not derived work. – jgauffin Dec 21 '12 at 6:45

I decide on the following:

If my code runs only with the GPL licensed library my code has also to be GPL.

If my code can run without the library (in your example the PHP code) it does not need to be GPL.

Disclaimer: IANAL.

share|improve this answer

Let me (IANAL) try to understand what you are saying:

  • You link a GPL module into your program
  • You wonder if that makes your program GPL

If so, the answer is "yes". I may not understand what you mean by "use Quercus to run my PHP code on the JVM and call into my Java code", but it certainly sounds like it's bundled into your code. If you only need to have something that is a "PHP interpreter in Java" and can provide another one, you could probably have documentation stating "You can, if you want, use Quercus".

I think the real answer here is to consult a lawyer, specializing in electronic copyright.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.