# 2022 PHP Programmer Cultivation Cheats

CrazyCodes

## foreword

Hi , everyone, I am CrazyCodes, I originally planned to present this article at the beginning of the year, but it was delayed due to many reasons

The following are my previous articles

## Computer Basics

### data structure

is a collection of data elements that have one or more specific relationships to each other

The above academic explanations are a bit obscure and difficult to understand. First of all, why so many data structures are created? The core reason is “requirements”. The key points of different requirements are different. The data structure is actually a trade-off between the allocation of time and space. Let's take an example

In terms of sequential lists (arrays) and singly linked lists

First of all, the sequential table, as the name implies, is sequential storage, then the advantage of sequential storage is that the access speed is fast, because its storage is continuous, we only need to add 1 to the current address to access the next array element, but it is Because its address is continuous, when we delete and add to the array, the trouble is bigger. When we want to delete or add an array element, we need to move all the elements after the deleted or added position. , to ensure that its storage is continuous.

Then we can think that data structures such as arrays are suitable for the requirements of fast query speed, small footprint, but slightly slower update speed.

Each node of the singly linked list consists of content and an address pointer to the next node (next) , each next points to the address of its next node, then compared to the array, because each content requires two If you store the same number of singly linked lists and arrays, the space occupied is twice that of the array. Let's continue to look at the update and delete operations of the singly linked list, because each element of the singly linked list is maintained by next, so we only It is necessary to point the next of the node to be inserted to the address of the node after the node to be inserted, and then point the next pointer of the previous node to be inserted to the address of the node to be inserted, and the update operation can be completed.

Then we can think that a data structure such as a singly linked list is suitable for the requirement of fast query and update speed, but it is acceptable to sacrifice some storage requirements.

So back to the real requirements, the characteristics of arrays and singly linked lists map many real requirements, such as

• Calculation of reward rules that require fast query speed and slower update speed
• Real-time updates of payment results for users who require fast update speed and can take up a little more space

Recommended introductory book "Dahua Data Structure (Yicai Enhanced Edition)" Tsinghua University Press recommended online course "The Beauty of Data Structure and Algorithm" by Mr. Wang Zheng

### algorithm

Good algorithms are closely related to data structures

Why is the algorithm related to the data structure? First of all, understand why the algorithm is needed, then what is the algorithm?

Algorithms are designed to better solve problems, so what problems do they solve? As with data structures, the issue of balancing time and space

An example of a primary school math problem

` `(15 + 4) * 3 = ?``

That's what your math teacher must have taught you

` `(15 * 3) + (4 * 3) = 57``

So why do it? We can also make the original formula, because the second method can be calculated at a faster speed, which is the solution time problem we said above.

To give a simple example, divide and conquer is a common method in algorithms. For example, binary search, we divide an array into two parts and retrieve the data to be searched at the same time, then it is twice as fast as searching one by one from the beginning (ignoring In extreme cases, the first or last hit), thus comparing binary search and simple retrieval, binary search improves efficiency (that is, shortens retrieval time)

Of course, there are some algorithms that need to be used in specific data structures, such as the well-known binary tree. The tree search is a classic case of divide and conquer. If it is an ordered tree, then its search time complexity is O( Log2n), which means that our average search time will be 1 times faster than normal sequential retrieval or even higher (ignoring extreme cases), but the construction of a binary tree is composed of a linked list, a tree's left child node pointer and right child node pointer The pointers occupy space respectively, which means that a tree node occupies at least three spaces, and keeping the tree in an ordered state requires sacrificing the update cost, then we can think that the main purpose of the tree search is to improve the speed of the query, and the update and space Occupancy can be tolerated to some extent.

Recommended introductory book "Interesting Learning Algorithms" People's Posts and Telecommunications Publishing House recommends online courses "The Beauty of Data Structures and Algorithms" by Mr. Wang Zheng

### database system

Databases are closely related to data structures

Paradigm is given by predecessors through continuous verification. In order to build a database with less redundancy and a reasonable structure, it is a certain rule that must be followed when designing a database. In relational databases, this specification is called a paradigm. This article not only describes paradigm design, but also Some examples will be given, and the data table design given to you will be analyzed with you, which belongs to the first paradigm.

Why is the data structure closely related to the database system? Taking how to improve the query efficiency as an example, if our data is stored in a text file (which belongs to sequential storage), then when we query a certain piece of data in the text, we can only start from the file header or The query starts at the end, which is similar to the sequential query of the linked list. If the query efficiency of O(N) is improved to the query efficiency of O(log2n), a tree structure is used here. MySQL uses a red-black tree, red-black tree. The specific principle of the tree will not be described too much in this article.

Recommended Online Course "45 Lectures on MySQL Practice" by Mr. Ding Qi

### computer composition

Understanding Computers at the Root

Taking the above database as an example, in addition to using a specific data structure to solve the efficiency problem, this is only at the application layer. At the physical layer, mechanical hard disks and SSDs will also affect the query efficiency of data. Cold data is suitable for storing in mechanical hard disks, while SSDs are more efficient. It is suitable for storing some frequently operated data, so can't SSD store cold data? The answer is of course possible, but at the hardware level, we have to consider the cost issue. Generally, cold data is used in data warehouses. Hundreds of millions of data are put into SSD hard drives, but they are not used frequently, so the cost will increase a lot.

Unless there is CPU, memory, GPU, etc. knowledge will be seen in the computer composition.

Recommended online course "The Principle of Computer Composition" by Xu Wenhao

### computer network

The above figure lists some core knowledge points that need to be understood, which can be learned in turn by google.

### operating system

Recommended Online Course "Interesting Talk about Linux Operating System" by Liu Chao

### Compilation principle

Recommended Online Course "The Beauty of Compilation Principles" by Gong Wenxue

## Development language

### C language

As the foundation of most high-level languages, C language does not need to be said.

### PHP's new journey

Unconsciously, PHP has gone through 26 years. During this process, a large number of excellent talents have been actively contributing to the research and development of PHP, such as Rasmus Lerdorf, Zeev Suraski, Andi Gutmans, Nikita Popov Waiting for a lot of people. In 2021, PHP will usher in a new round of development.

Just on November 22, 2021, JetBrains, the developer of Phpstorm, announced that it will jointly establish the PHP Foundation with Automattic, Laravel, Laravel, Acquia and other companies. According to reports, the PHP Foundation will be a non-profit organization whose mission is to ensure the vitality and prosperity of the PHP language.

The PHP Foundation will be a non-profit organization whose mission is to ensure the longevity and prosperity of the PHP language. At the same time, the foundation will be implemented through the Open Collective. Open Collective is a foundation service provider that handles legal and accounting aspects and is used by several open source projects such as Vue.js, Open Web Docs, webpack, Yii Framework, and more.

In addition, the PHP Foundation is expected to raise about \$300,000 per year, of which JetBrains will contribute \$100,000 per year, and any php-src contributor can apply to the foundation for funding. In the early days of the foundation, an interim management body will be established, including members: Rasmus Lerdorf, Dmitry Stogov, Joe Watkins, Sara Golemon, Derick Rethans, Sebastian Bergmann and Nikita Popov. Meanwhile, the current RFC process will not change and language decisions will always be left to the PHP Internals community.

The official website of the PHP Foundation https://opencollective.com/phpfoundation

## Summarize

Originally, there are nearly 1k words of description below. Personally, I feel that it is not necessary to expand the explanation. It is presented here in a summary form.

1. The language is only a development tool, but it should also adapt to the current situation of the industry and appropriately expand its own technology stack (such as go)
2. Interested in participating in some open source programs
3. The structure is not formed at one time, it is gradually accumulated
4. Soft skills: English proficiency, document writing, graphic design
5. If you want to be a leader in the future, at least now have a certain self-discipline on your own documents and code
6. Combat merit vs internal merit, war merit represents what you do, inner merit lies in what you have accumulated in things
7. Review, review, review, regularly review, say important things three times