The PHP Foundation has published a new guide for developers who want to contribute to PHP but do not know where to begin. Matt Stauffer wrote the guide and lays out 11 ways to help without requiring every contributor to know C.
The guide divides the work into three areas: PHP itself, the projects and communities around PHP, and opportunities supported by the Foundation.
Seven Ways to Help PHP Core
The first section covers seven paths into PHP's core development work:
- Test prereleases. Run applications and package test suites on PHP alpha, beta, and release candidate builds.
- Report and reproduce bugs. File a clear issue or reduce an existing report to a small example.
- Improve documentation. Correct unclear pages, add examples, and help with translations.
- Write tests. Turn a reproduced bug into a failing PHPT test.
- Fix or review issues. Submit a patch, test a pull request, or review someone else's change.
- Join internals discussions. Follow proposals and offer useful technical feedback.
- Work on RFCs. Test proposals, study their compatibility impact, or author one when a change needs a formal vote.
Several of these options require PHP knowledge but no C. Testing a prerelease or reducing a bug report can give core contributors the information they need to find a fix.
Start by Testing PHP 8.6
PHP 8.6 is already in beta, which makes prerelease testing a useful place to begin. Package maintainers can add a non-blocking PHP 8.6 job to continuous integration. Application teams can run their tests on a local or staging environment.
If something breaks, first reduce it to the smallest example possible. A short script with clear steps, expected output, and actual output is much easier to investigate than a full application.
PHP's own tests use the PHPT format. A basic PHPT file contains a description, PHP code to run, and the output PHP should produce. Writing a failing test is useful even when the contributor does not know how to fix the bug.
Four Ways to Help Beyond php-src
The guide lists four more ways to support PHP without changing the language source:
- Help maintain an existing open-source project.
- Teach developers through documentation, talks, articles, or direct help.
- Support local user groups, meetups, and conferences.
- Represent modern PHP at broader software events and discussions.
These contributions help developers use PHP well and keep the projects they depend on maintained.
Where the Work Happens
The guide points newcomers to the main places PHP work and discussion happen:
- php-src on GitHub for issues, code, and pull requests
- The PHP documentation contribution guide
- The internals mailing list and its searchable externals.io archive
- The PHP Community Discord, including
#php-src-helpand#php-internals - The PHP RFC list for proposals under discussion
An RFC is not required for every fix. Most bug fixes can move through a normal pull request. RFCs are for language features and other changes that need a formal decision.
Developers can also contribute to an RFC without writing it. Testing an implementation, finding a compatibility problem, or sharing a real use case can change the final design.
Pick One Small First Step
The guide closes with a direct message:
If you write PHP, you are qualified to contribute to PHP. Don't let anyone tell you otherwise.
The practical advice is to choose work that fits the time available. That might mean testing PHP 8.6 for an afternoon, improving one documentation page, or following one RFC from discussion through its vote.
This guide follows the Foundation's PHP onboarding initiative, which is working to make core contribution easier to enter. Read the full guide for links and a first step under each contribution path.