How to contribute code to PHP_PHP Tutorial
PHP previously migrated the source code to git for management, and also made a mirror on github (https://github.com/php/php-src). This will facilitate more development. Those who contribute code for PHP.
I am writing this article today to give students in China who are willing to contribute to the PHP open source community an example of how to contribute your wisdom to PHP.
Now, suppose you want to contribute a new feature to wiki. In addition to the following steps, you also need to submit an RFC on wiki.php.net. I will introduce this later. Let us keep it simple for now. Suppose You just want to fix a bug for PHP (generally speaking, you can find reported bugs in PHP here: PHP Bugs). Now assume that you have figured out how to fix this bug.
1. First, you need to have a github account. If not, register here: Register github.
2. Fork the source code of PHP. There is a fork button in the upper right corner of the PHP Github page, click it
3. After Fork, you will have your own PHP source code repository. Now you can modify the PHP source code in this repository to fix bugs for it.
There is nothing to say about specific development, but if you have questions about the use of Git, you can refer to the Git manual, such as this: ProGit
I will provide you with a simple explanation here. If you start development on Github, there will be an explanation on your own PHP code repository page, such as on my PHP repository page https://github.com/laruence /php-src:
ssh git@github.com:laruence/php-src.git
Then, I executed on the local development environment:
$git clone git@github.com:laruence/php-src.git
Then, you will get a php-src directory, go in and develop,
4. After you complete the repair, you submit it to your own PHP repository. Then, in the upper right corner of the Github page of your PHP source code repository, there will be a pull request button. Click it.
When submitting, please pay attention to the format of your submission description. First of all, the first line should be a short description (up to 79 characters) explaining what changes you have made. If you cannot finish the sentence, insert a blank line and enter A long explanation (see New Commit Message Format):
n
n
If you are fixing a bug listed on bugs.php.net, your brief description should look like this:
1 Fixed Bug #bug number (Bug description)
5. Then, fill in the relevant information, and Github will send a Pull Request email containing your update to the PHP pull request email group (you don’t have to worry about your English, as long as you can speak it, we can understand it) , of course, if you really don’t want to write in English, it doesn’t matter. Just write in Chinese. I will deal with it when I see it. If I can’t handle it, I will also translate it for you).
6. Finally, if the PHP Committers think your fix is correct (there are some options to pay attention to when contributing code to PHP, I leave them below). Your Pull Request will be merged into the PHP source code.
Now, assuming that what you want to submit is an update (adding new functions, adding new syntax), then when you submit the Pull Request, you also need to send an email to the internals@lists.php.net mailing group to explain Why do you want to submit this update? Let people in this mailing group discuss it and help you improve your ideas.
Finally, after you have contributed some updates to PHP (updates accepted by the Committer), then you can try to apply for your own PHP Developer account on: Register Svn Accout.
Appendix:
There are a few things to note when contributing source code to PHP (frequently asked questions):
1. Only write C89-compatible code. For example, do not use single-line comments (//). The definition of variables must be before all statements (the beginning of the block)..
2. When naming variables, follow the existing specifications of PHP and do not use camel case naming.
3. For some very small updates, such as spelling errors in the code, everyone is still encouraged to submit a patch on bugs.php.net. After all, Merge Pull Request can sometimes be more troublesome.
Excerpted from laruence

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.

The library used for floating-point number operation in Go language introduces how to ensure the accuracy is...

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

Running the H5 project requires the following steps: installing necessary tools such as web server, Node.js, development tools, etc. Build a development environment, create project folders, initialize projects, and write code. Start the development server and run the command using the command line. Preview the project in your browser and enter the development server URL. Publish projects, optimize code, deploy projects, and set up web server configuration.

Which libraries in Go are developed by large companies or well-known open source projects? When programming in Go, developers often encounter some common needs, ...

In PHP8, match expressions are a new control structure that returns different results based on the value of the expression. 1) It is similar to a switch statement, but returns a value instead of an execution statement block. 2) The match expression is strictly compared (===), which improves security. 3) It avoids possible break omissions in switch statements and enhances the simplicity and readability of the code.
