Skip to content

Commit 7fd4d3a

Browse files
committed
license-update: update phpinfo() license statements
RFC: https://wiki.php.net/rfc/php_license_update
1 parent 19cb3b0 commit 7fd4d3a

3 files changed

Lines changed: 94 additions & 31 deletions

File tree

ext/standard/info.c

Lines changed: 62 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,35 +1019,77 @@ PHPAPI ZEND_COLD void php_print_info(int flag)
10191019

10201020
if (flag & PHP_INFO_LICENSE) {
10211021
if (!sapi_module.phpinfo_as_text) {
1022-
SECTION("PHP License");
1022+
SECTION("License");
10231023
php_info_print_box_start(0);
10241024
php_info_print("<p>\n");
1025-
php_info_print("This program is free software; you can redistribute it and/or modify ");
1026-
php_info_print("it under the terms of the PHP License as published by the PHP Group ");
1027-
php_info_print("and included in the distribution in the file: LICENSE\n");
1025+
php_info_print("PHP is free software: you can redistribute it and/or modify it under the ");
1026+
php_info_print("terms of the Modified BSD License (SPDX-License-Identifier: BSD-3-Clause):\n");
10281027
php_info_print("</p>\n");
1029-
php_info_print("<p>");
1030-
php_info_print("This program is distributed in the hope that it will be useful, ");
1031-
php_info_print("but WITHOUT ANY WARRANTY; without even the implied warranty of ");
1032-
php_info_print("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
1028+
php_info_print("<p>\n");
1029+
php_info_print("Copyright &copy; 1999–2025, The PHP Group and Contributors.<br>\n");
1030+
php_info_print("Copyright &copy; 1999–2025, Zend by Perforce.\n");
10331031
php_info_print("</p>\n");
1034-
php_info_print("<p>");
1035-
php_info_print("If you did not receive a copy of the PHP license, or have any questions about ");
1036-
php_info_print("PHP licensing, please contact license@php.net.\n");
1032+
php_info_print("<p>\n");
1033+
php_info_print("Redistribution and use in source and binary forms, with or without ");
1034+
php_info_print("modification, are permitted provided that the following conditions are met:\n");
1035+
php_info_print("</p>\n");
1036+
php_info_print("<ol>\n");
1037+
php_info_print("<li>Redistributions of source code must retain the above copyright notice, this ");
1038+
php_info_print("list of conditions and the following disclaimer.</li>\n");
1039+
php_info_print("<li>Redistributions in binary form must reproduce the above copyright notice, ");
1040+
php_info_print("this list of conditions and the following disclaimer in the documentation ");
1041+
php_info_print("and/or other materials provided with the distribution.</li>\n");
1042+
php_info_print("<li>Neither the name of the copyright holder nor the names of its ");
1043+
php_info_print("contributors may be used to endorse or promote products derived from ");
1044+
php_info_print("this software without specific prior written permission.</li>\n");
1045+
php_info_print("</ol>\n");
1046+
php_info_print("<p>\n");
1047+
php_info_print("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" ");
1048+
php_info_print("AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ");
1049+
php_info_print("IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ");
1050+
php_info_print("DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE ");
1051+
php_info_print("FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ");
1052+
php_info_print("DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ");
1053+
php_info_print("SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ");
1054+
php_info_print("CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ");
1055+
php_info_print("OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ");
1056+
php_info_print("OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n");
10371057
php_info_print("</p>\n");
10381058
php_info_print_box_end();
10391059
} else {
1040-
php_info_print("\nPHP License\n");
1041-
php_info_print("This program is free software; you can redistribute it and/or modify\n");
1042-
php_info_print("it under the terms of the PHP License as published by the PHP Group\n");
1043-
php_info_print("and included in the distribution in the file: LICENSE\n");
10441060
php_info_print("\n");
1045-
php_info_print("This program is distributed in the hope that it will be useful,\n");
1046-
php_info_print("but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
1047-
php_info_print("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
1061+
php_info_print("License\n");
1062+
php_info_print("\n");
1063+
php_info_print("PHP is free software: you can redistribute it and/or modify it under the\n");
1064+
php_info_print("terms of the Modified BSD License (SPDX-License-Identifier: BSD-3-Clause):\n");
1065+
php_info_print("\n");
1066+
php_info_print("Copyright © 1999–2025, The PHP Group and Contributors.\n");
1067+
php_info_print("Copyright © 1999–2025, Zend by Perforce.\n");
1068+
php_info_print("\n");
1069+
php_info_print("Redistribution and use in source and binary forms, with or without\n");
1070+
php_info_print("modification, are permitted provided that the following conditions are met:\n");
1071+
php_info_print("\n");
1072+
php_info_print("1. Redistributions of source code must retain the above copyright notice, this\n");
1073+
php_info_print(" list of conditions and the following disclaimer.\n");
1074+
php_info_print("\n");
1075+
php_info_print("2. Redistributions in binary form must reproduce the above copyright notice,\n");
1076+
php_info_print(" this list of conditions and the following disclaimer in the documentation\n");
1077+
php_info_print(" and/or other materials provided with the distribution.\n");
1078+
php_info_print("\n");
1079+
php_info_print("3. Neither the name of the copyright holder nor the names of its\n");
1080+
php_info_print(" contributors may be used to endorse or promote products derived from\n");
1081+
php_info_print(" this software without specific prior written permission.\n");
10481082
php_info_print("\n");
1049-
php_info_print("If you did not receive a copy of the PHP license, or have any\n");
1050-
php_info_print("questions about PHP licensing, please contact license@php.net.\n");
1083+
php_info_print("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n");
1084+
php_info_print("AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n");
1085+
php_info_print("IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n");
1086+
php_info_print("DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n");
1087+
php_info_print("FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n");
1088+
php_info_print("DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n");
1089+
php_info_print("SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n");
1090+
php_info_print("CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n");
1091+
php_info_print("OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n");
1092+
php_info_print("OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n");
10511093
}
10521094
}
10531095

ext/standard/tests/general_functions/phpinfo.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Environment
5757
%r(.*?)%r
5858
PHP Variables
5959
%r(.*?)%r
60-
PHP License
60+
License
6161
%r(.*?)%r
6262
bool(true)
6363
--
@@ -66,6 +66,6 @@ bool(true)
6666
--
6767
phpinfo()
6868

69-
PHP License
69+
License
7070
%r(.+?)%r
7171
bool(true)

sapi/cli/tests/019.phpt

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,37 @@ echo "\nDone\n";
2121
phpinfo()
2222
PHP Version => %s
2323
%a
24-
PHP License
25-
This program is free software; you can redistribute it and/or modify
26-
it under the terms of the PHP License as published by the PHP Group
27-
and included in the distribution in the file: LICENSE
24+
License
2825

29-
This program is distributed in the hope that it will be useful,
30-
but WITHOUT ANY WARRANTY; without even the implied warranty of
31-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26+
PHP is free software: you can redistribute it and/or modify it under the
27+
terms of the Modified BSD License (SPDX-License-Identifier: BSD-3-Clause):
3228

33-
If you did not receive a copy of the PHP license, or have any
34-
questions about PHP licensing, please contact license@php.net.
29+
Copyright © 1999–2025, The PHP Group and Contributors.
30+
Copyright © 1999–2025, Zend by Perforce.
31+
32+
Redistribution and use in source and binary forms, with or without
33+
modification, are permitted provided that the following conditions are met:
34+
35+
1. Redistributions of source code must retain the above copyright notice, this
36+
list of conditions and the following disclaimer.
37+
38+
2. Redistributions in binary form must reproduce the above copyright notice,
39+
this list of conditions and the following disclaimer in the documentation
40+
and/or other materials provided with the distribution.
41+
42+
3. Neither the name of the copyright holder nor the names of its
43+
contributors may be used to endorse or promote products derived from
44+
this software without specific prior written permission.
45+
46+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
47+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
49+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
50+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
51+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
52+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
53+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
54+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
55+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3556

3657
Done

0 commit comments

Comments
 (0)