A PHP license change is imminent
A PHP license change is imminent
PHP 许可证即将变更
PHP’s licensing has been a source of confusion for some time. The project is, currently, using two licenses that cover different parts of the code base: PHP v3.01 for the bulk of the code and Zend v2.0 for code in the Zend directory. Much has changed since the project settled on those licenses in 2006, and the need for custom licensing seems to have passed. An effort to simplify PHP’s licensing, led by Ben Ramsey, is underway; if successful, the existing licenses will be deprecated and replaced by the BSD three-clause license. The PHP community is now voting on the license update RFC through April 4, 2026.
PHP 的许可证问题长期以来一直令人困惑。目前,该项目使用两种许可证来覆盖代码库的不同部分:PHP v3.01 用于大部分代码,Zend v2.0 用于 Zend 目录下的代码。自 2006 年项目确定这些许可证以来,情况发生了很大变化,对自定义许可证的需求似乎已经过去。在 Ben Ramsey 的领导下,简化 PHP 许可证的工作正在进行中;如果成功,现有的许可证将被弃用,并替换为 BSD 三条款许可证(BSD three-clause license)。PHP 社区目前正在对该许可证更新的 RFC(征求意见稿)进行投票,投票截止日期为 2026 年 4 月 4 日。
In its early days, the PHP project changed its licensing with some frequency: between 1995 and 2006, PHP changed licenses or modified the terms of its custom licenses seven times. Initially, PHP was distributed under the GPLv2. Then PHP 3, released in 1998, was shipped under a dual-license scheme; it was available under the GPLv2 and a new PHP License based on the Apache License 1.0. This was chosen by PHP creator Rasmus Lerdorf to make PHP more palatable to commercial interests: “PHP2 has gotten quite a few nibbles from various commercial interests over the past year. The GPL, plus my own stubbornness killed most of them. PHP, if I can help it, will always be free. But, I am not against letting commercial entities take a shot at a commercial version as long as the terms are such that the major contributors don’t feel cheated.”
在早期,PHP 项目曾频繁更改许可证:在 1995 年至 2006 年间,PHP 更改许可证或修改其自定义许可证条款的次数多达七次。最初,PHP 是在 GPLv2 下发布的。随后,1998 年发布的 PHP 3 采用了双重许可方案;它既可以在 GPLv2 下使用,也可以在基于 Apache License 1.0 的新 PHP 许可证下使用。PHP 的创始人 Rasmus Lerdorf 选择这样做是为了让 PHP 更容易被商业利益所接受:“过去一年里,PHP2 引起了不少商业利益方的兴趣。GPL 加上我自己的固执扼杀了其中大部分。如果我能做到,PHP 将永远是免费的。但是,我不反对让商业实体尝试推出商业版本,只要条款能确保主要贡献者不会感到被欺骗。”
The first iteration of the custom license, though, had a clause that required written permission from the PHP development team for commercial redistribution. That proved unworkable, so the clause was stricken for the PHP 3.0.14 release. The LICENSE file in that release did not carry a version number. PHP 4.0, released in May 2000, was a major overhaul; it included the Zend Engine, described at the time as a full rewrite of the PHP scripting engine, written by Zeev Suraski and Andi Gutmans. The pair had formed a company, Zend Technologies, which sought to commercialize the Zend Engine separately from PHP; it provided a grant to allow the Zend Engine to be integrated into PHP and guaranteed that it would remain under the Zend license or another license consistent with the Open Source Definition (OSD) from the Open Source Initiative (OSI), even though the Zend license itself is not OSI-approved. Thus, the PHP project picked up the Zend license for code in the Zend directory of its source tree.
然而,自定义许可证的第一个版本包含一个条款,要求商业再分发必须获得 PHP 开发团队的书面许可。事实证明这不可行,因此该条款在 PHP 3.0.14 版本中被删除。该版本中的 LICENSE 文件没有标注版本号。2000 年 5 月发布的 PHP 4.0 是一次重大改革;它引入了 Zend Engine,当时被描述为对 PHP 脚本引擎的全面重写,由 Zeev Suraski 和 Andi Gutmans 编写。两人成立了一家名为 Zend Technologies 的公司,试图将 Zend Engine 与 PHP 分开进行商业化;该公司提供了一笔赠款,允许将 Zend Engine 集成到 PHP 中,并保证它将保留在 Zend 许可证或符合开源促进会 (OSI) 开源定义 (OSD) 的其他许可证下,尽管 Zend 许可证本身并未获得 OSI 批准。因此,PHP 项目在其源代码树的 Zend 目录中采用了 Zend 许可证。
PHP 4.0 also dropped the GPLv2 altogether in favor of the PHP License version 2.02. PHP’s licenses were updated a few more times; the PHP 3.0 license was approved by the OSI, but the license received a small final set of changes that pushed it to version 3.01. The changes only modified the copyright years and rephrased how the acknowledgements should be phrased for PHP and Zend, they did not impact the rights granted in any way. The reasons for that change are lost to the mists of time, but that version was never approved by the OSI. The license text has proven to be a problem because it only appears to apply to software shipped by the “PHP Group”. Confusingly, the PHP Group does not seem to be an actual legal entity, but a list of ten people involved in PHP development early on. Some contend that software from parties other than the PHP Group cannot use it as a valid license. That has caused headaches for other projects, such as Debian. Ramsey has covered the history of PHP’s licensing in the RFC for those who want even more detail.
PHP 4.0 还彻底放弃了 GPLv2,转而采用 PHP License 2.02 版本。PHP 的许可证此后又更新了几次;PHP 3.0 许可证获得了 OSI 的批准,但该许可证随后进行了一组微小的最终修改,升级到了 3.01 版本。这些修改仅更改了版权年份并重新措辞了 PHP 和 Zend 的致谢方式,并未以任何方式影响所授予的权利。这次变更的原因已无从考证,但该版本从未获得 OSI 的批准。许可证文本已成为一个问题,因为它似乎仅适用于由“PHP Group”分发的软件。令人困惑的是,PHP Group 似乎并非一个实际的法律实体,而是一份早期参与 PHP 开发的十人名单。一些人认为,非 PHP Group 方发布的软件不能将其作为有效许可证使用。这给 Debian 等其他项目带来了麻烦。对于想要了解更多细节的读者,Ramsey 在 RFC 中涵盖了 PHP 许可证的历史。
Proposal
提案
Ramsey opened discussion on the RFC in July 2025; he proposed replacing both of the existing licenses with the three-clause BSD license beginning with the next major release, PHP 9.0. He had enlisted an expert for the exercise; he said he was working with Pamela Chestek, chair of OSI’s license committee, for legal questions and concerns. He said that he had already spoken with all the members of the PHP Group and each member had already voiced approval for the change. He had also gotten approval from Perforce Software, which had acquired Zend in 2019 as part of the portfolio owned by Rogue Wave Software (which had, itself, acquired Zend in 2015).
Ramsey 于 2025 年 7 月开启了关于该 RFC 的讨论;他提议从下一个主要版本 PHP 9.0 开始,将现有的两种许可证全部替换为 BSD 三条款许可证。他为此聘请了一位专家;他表示正在与 OSI 许可证委员会主席 Pamela Chestek 合作,以处理法律问题和疑虑。他说他已经与 PHP Group 的所有成员进行了沟通,每位成员都已表示支持这一变更。他还获得了 Perforce Software 的批准,该公司于 2019 年收购了 Zend,作为 Rogue Wave Software(该公司于 2015 年收购了 Zend)旗下资产组合的一部分。
One might wonder about all of the individual contributors who had submitted code to PHP over the years: don’t they also have to approve a license change? In the RFC, Ramsey argues that is not the case. PHP has not required a contributor-license agreement (CLA) to assign copyright to the project, and there is no implicit transfer of copyright to the project. However, there is an implied assignment of license: When someone contributes to an open source project, they own the copyright on their contributions, but unless they specify a different license covering their contributions (which is wholly valid, with examples including Derick Rethans’s timelib, which is bundled within the PHP source code), it is implied they are granting use of their contributions under the same license terms as the project. […] Typically, when changing the license on an open source project, one must gain approval from all copyright owners, since the rights granted might change under the terms of the new license. However, as described in this section and in other places in this document, changing to the Modified BSD License does not change any of the rights granted by contributors who are not the PHP Group or Perforce Software. Even though the RFC asserts that the project does not require permission, it says that the discussion would remain open for at least six months “as a courtesy” to ensure that interested parties had an opportunity to respond. Ramsey provided updates and reminded people that the topic was still under discussion a few times since the RFC’s announcement in July; thus far, it does not…
人们可能会问,多年来向 PHP 提交代码的所有个人贡献者呢?他们难道不需要批准许可证变更吗?在 RFC 中,Ramsey 认为并非如此。PHP 并没有要求贡献者签署贡献者许可协议 (CLA) 来将版权转让给项目,也没有隐含的版权转让。然而,存在一种隐含的许可证授予:当某人向开源项目做出贡献时,他们拥有其贡献的版权,但除非他们指定了涵盖其贡献的不同许可证(这是完全有效的,例如捆绑在 PHP 源代码中的 Derick Rethans 的 timelib),否则隐含的意思是他们同意在与项目相同的许可条款下授予其贡献的使用权。[…] 通常,在更改开源项目的许可证时,必须获得所有版权所有者的批准,因为根据新许可证的条款,所授予的权利可能会发生变化。然而,正如本节及本文档其他部分所述,更改为修改后的 BSD 许可证并不会改变非 PHP Group 或 Perforce Software 的贡献者所授予的任何权利。尽管 RFC 断言该项目不需要许可,但它表示讨论将至少保持开放六个月,以“出于礼貌”确保相关方有机会做出回应。自 7 月份宣布 RFC 以来,Ramsey 多次提供更新并提醒人们该主题仍在讨论中;到目前为止,它并没有……