Does GNU General Public License Persist When Changing Source Code Language
<p>Recently I rewrote a very small PHP program (~300 lines) under the GNU General Public License into an equivalent C# program and it made me curious where the new program I wrote stands legally. Is the C# code I have written still under the GNU General Public License since it was converted from the PHP program?</p>

<p>The new code I have written is a direct - almost line by line - translation of the PHP program into C#.  After the translation I added a few additional features to it I needed that were not in the original PHP version.</p>

<p>To be perfectly clear, this is mostly asked out of simple curiosity. Regardless of the answer, I am at the very least planning on giving credit to the author of the PHP program and providing a link back to his code.</p>

<p>I actually found the answer to this after asking by looking at <a href="https://law.stackexchange.com/questions/8213/is-it-legal-to-rewrite-a-java-openjdk-library-into-another-programming-languag">this question</a>, which led me <a href="https://www.gnu.org/licenses/gpl-faq.en.html#TranslateCode" rel="nofollow noreferrer">to the gpl faq</a>.
In case the link dies, it says:</p>
<blockquote>
<p>What does the GPL say about translating some code to a different programming language?</p>
<p>Under copyright law, translation of a work is considered a kind of modification. Therefore, what the GPL says about modified versions applies also to translated versions.</p>
</blockquote>
<p>Therefore, the code I wrote is considered to be a modified version of the PHP code I found and must be released under the GPL license.</p>

licensing open-source-software