I am coding a PHP serial access class and have been taking pointers from the PHP-serial class on Google Code (here). That class is based on PHP 4 and I'm creating a PHP 5 class that allows more functionality and is specific to some business demands I have.

There is no code copied and I have done all the coding. Does the class I'm writing fall under the Google Code's GPL or am I free to select a license that I feel is appropriate? I'm not sure of the standard that applies to licensing when you are only looking to another work for pointers.

2 Answers 2


The GNU GPL is a source code license. The reciprocal (viral) clause only applies to derivative code. Derivative code only. It is not a patent license, and thus you can take and reimplement all ideas or algorithms. Reimplement, not verbatim code duplication. And whichever license you want to distribute your independently written code under, is up to you. Not that another FLOSS developer would mind anyway. - If you are very uneasy and want a reaffirmation, you can also contact [email protected] (patience).

But btw, the GNU GPL v2 is already more permissive on PHP code than on compiled languages. Unless your library was incorporated as core dependency in some proprietary/obfuscated code, it would work akin the LGPL.

As a side note, it's not sensible to rewrite something from PHP4 to PHP5. It's the same friggin language. If you just add syntactic sugar (private, protected, etc.) but use no real new functionality (ArrayAccess, SPLSomething, etc.) then pointless. So I hope there is really new functionality in your reimplementation.


If you just keep your work in-house (ie, don't distribute it), then you can do whatever you want with GPL software.

If you intend to sell your work and you have questions about licensing restrictions, you should talk to a lawyer.

Just a reminder to everyone else on Stack Exchange: There aren't many attorneys on here. The few that are aren't your attorney. Don't find-out the hard way that you're doing something wrong.

  • At most I'm looking to release it as open-source, I just want to not violate the GPL by doing so.
    – Patrick
    Dec 21, 2010 at 22:08
  • @Patrick If you release under the GPL, then you'll be within the spirit and letter of the license. Were you looking to release under something else? Dec 21, 2010 at 22:14
  • I'm leaning towards that, but if I wanted to release it under a more permissive license I wouldn't want that to come back and bite me.
    – Patrick
    Dec 21, 2010 at 22:18
  • 4
    @Patrick: Whether you have created a derivative work or not is a legal question. As chrisaycock said, most of us aren't lawyers, and absent a formal relationship none of us are your lawyer. It is possible for software that contains none of the original code to be a derived work, and it's possible for software that contains some of the original code to not be a derived work. It will be decided on a case-by-case basis. Either release under GPL, write Google and ask, or consult a lawyer specializing in software law. Dec 21, 2010 at 22:25
  • @David Yes, ask permission of the original author if in doubt. And keep the email! Dec 21, 2010 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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