1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00
Files
archived-web-php/license/distrib-guidelines-code.php
Peter Kokot dd8d8bf863 Sync final and leading newlines
This patch adds some missing newlines, trims some multiple redundant
final newlines into a single one, and trims few redundant leading
newlines.

According to POSIX, a line is a sequence of zero or more non-'<newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-17 12:37:26 +02:00

66 lines
2.6 KiB
PHP

<?php
$_SERVER['BASE_PAGE'] = 'license/distrib-guidelines-code.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
site_header("License Information", array("current" => "help"));
?>
<h2>PHP Distribution Guidelines</h2>
<p>
The PHP code can be redistributed in source or binary form provided that
the terms of the PHP license are respected (see
<a href="http://www.php.net/license/3_01.txt">version 3.01</a>).
</p>
<p>
In plain English, this means that you have to include the full license text
in human-readable form with every distributed copy of PHP, whether source
or binary. One way of doing this is to put a copy of the PHP license into a
text file that you include with the source or binary package before
distribution. This ensures that the license information can be read
properly even when a binary is shipped.
A text file containing license and copyright information is sometimes
given the filename "Notices", and may be referred to as a "Notices file".
</p>
<p>
Some files in the PHP codebase have been contributed under other licenses.
If you want to distribute these files, you also need to respect the terms
of those licenses.
To check, look for the terms indicated in the license + copyright comment
block at the top of the source file.
</p>
<p>
The license terms for such a file may require that its own license and copyright
information must be included with every distributed copy (including binaries).
This is quite a common requirement, which can be satisfied by adding the
appropriate license text into a text file for distribution purposes, like the
"Notices"-type of file suggested above.
</p>
<p>
A single "Notices" file could be used to hold the collection of license
and copyright information that applies to PHP in general (the PHP license) and
any files with additional licenses that you want to distribute (for example
Zend, TSRM etc.)
It is good practice to indicate which source file(s) a particular license
applies to.
</p>
<h3>Modified products derived from PHP</h3>
<p>
You can distribute your own software product which has been derived
from PHP, in source or binary form, provided that:
</p>
<ul>
<li>
relevant copyright information and license(s) from
the PHP codebase are distributed in human-readable form with
every copy, as described above.
</li>
<li>
you don't use the name "PHP" without permission, either
to promote your own product or within your product's name
(see clauses #3 and #4 in the PHP license
<a href="http://www.php.net/license/3_01.txt">version 3.01</a>).
</li>
</ul>
<?php site_footer();