PHP is available for use under the terms of the Modified BSD License, also known as the PHP License, version 4.
The Modified BSD License is an Open
Source license,
approved by the Open
Source Initiative, and
compatible with
the GNU General Public License (GPL). It is a
permissive
software license that does not have the
copyleft restrictions
associated with licenses like the GNU GPL. Its SPDX identifier is
BSD-3-Clause.
Some files in PHP software have been contributed under other compatible licenses and may carry additional requirements and copyright information. This is indicated in the license/copyright comment block at the top of each source file. Sometimes the license terms are included in a separate license file in the same directory as the source file.
Copyright © The PHP Group and Contributors.
Copyright © Zend Technologies Ltd., a subsidiary company of Perforce
Software, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Earlier versions of PHP software were distributed under the terms of versions 2.01, 2.02, 3.0, and 3.01 of the PHP License. At your option, you may choose to use any earlier version of PHP software under the terms of the PHP License, version 4. This is in accordance with section 5 of the PHP License, versions 3.0 and 3.01, and section 4 of the PHP License, versions 2.01 and 2.02 (emphasis added):
Once covered code has been published under a particular version of the license, you may always continue to use it under the terms of that version. You may also choose to use such covered code under the terms of any subsequent version of the license published by the PHP Group.
Q. I've written a project in PHP that I'm going to release as open source, and I'd like to call it PHPTransmogrifier. Is that OK?
A. We cannot really stop you from using PHP in the name of your project, but we would prefer you come up with your own name independent of the PHP name.
"PHP" is the PHP project's unique brand. When others see the name "PHP," they associate it with this project. When you use "PHP" as part of your software's name, you are linking your efforts to those of the entire PHP development community and the years of work that has gone into the PHP project.
Additionally, using "PHP" in your project's name causes a lot of confusion, making it more difficult for people to find your project or get help with it. Inevitably, people looking for your project will open issues on the PHP project's issue tracker, taking up the valuable time of our volunteers.
So, please, pick a name that stands on its own merits. If others find your project useful, it will not take long to establish a reputation for yourself.
Q. What are the differences between the PHP License, version 3.01, and the PHP License, version 4?
A. The PHP License, version 4 removes clauses 4, 5, and 6 of
the PHP License, version 3.01. This makes it effectively identical to the
Modified BSD License (BSD-3-Clause).
While the Open Source Initiative (OSI) approved versions 3.0 and 3.01 of the PHP License through their legacy approval process, the licenses were not compatible with the GPL. Additionally, clauses 4 and 6 were challenging or impossible to enforce, and various readings and interpretations sometimes caused confusion among distributors. As a result, the PHP Group decided to invoke clause 5 of the PHP License to publish a new version. The new version resolves all problems with the PHP License (perceived or actual) while preserving the rights granted by contributors and the rights granted to users.
Q. Is the source code in the Zend/ directory
still licensed under the separate Zend Engine License?
A. No. At the same time the PHP Group published a new version
of the PHP License, Zend Technologies Ltd., a subsidiary of Perforce Software,
Inc., invoked clause 4 of the Zend Engine License, version 2.00, to publish a
new version of the Zend Engine License. The Zend Engine License, version 3.0,
removes clauses 4, 5, and 6 of the Zend Engine License, making it effectively
identical to the Modified BSD License (BSD-3-Clause).
Q. Can I still use the PHP License or Zend Engine License for my own projects?
A. You can, but you shouldn't. The PHP License and Zend Engine License are deprecated and considered legacy licenses. They are not recommended for use in new projects. Instead, consider using a similar license, like the Apache License, Modified BSD License, GNU Lesser General Public License (LGPL), or MIT License. This is not legal advice; please consult with a lawyer before adopting or making any changes to your license.
Q. Why is PHP 4 not dual-licensed under the GNU General Public License (GPL) like PHP 3 was?
A. GPL enforces many restrictions on what can and cannot be done with the licensed code. The PHP developers decided to release PHP under a much more permissive license (BSD-style) to allow broader uses of PHP by more people.
For related projects, please refer to licensing information on the Project websites: