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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

Steps to update git code: Check out code: git clone https://github.com/username/repo.git Get the latest changes: git fetch merge changes: git merge origin/master push changes (optional): git push origin master

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

To download projects locally via Git, follow these steps: Install Git. Navigate to the project directory. cloning the remote repository using the following command: git clone https://github.com/username/repository-name.git

Git code merge process: Pull the latest changes to avoid conflicts. Switch to the branch you want to merge. Initiate a merge, specifying the branch to merge. Resolve merge conflicts (if any). Staging and commit merge, providing commit message.

Resolve: When Git download speed is slow, you can take the following steps: Check the network connection and try to switch the connection method. Optimize Git configuration: Increase the POST buffer size (git config --global http.postBuffer 524288000), and reduce the low-speed limit (git config --global http.lowSpeedLimit 1000). Use a Git proxy (such as git-proxy or git-lfs-proxy). Try using a different Git client (such as Sourcetree or Github Desktop). Check for fire protection
