Home  >  Article  >  Backend Development  >  How to read the php manual

How to read the php manual

(*-*)浩
(*-*)浩Original
2019-05-13 16:38:415510browse

Every time a newbie comes to ask questions, I find that most of them have not read the manual carefully.

For novices. I think "being able to read" manuals is a very important skill.

I believe you all have the same feeling as I did when I was a novice. After reading the manual, it’s almost the same as not reading it...

1. I can’t understand the manual (I don’t know where to start reading it. I should Which to read first)

2. I understand it a little bit but can’t use it (I don’t know how to use the method, where to write it, and I can’t solve the various errors reported)

3. After reading it, I can’t use it. I can’t help it (after reading it is the same as not reading it, unless you memorize the function and search it in the index next time)

Maybe you have other questions, you can tell us and we will study together~

Welcome the big guys to spray wildly. Only after the big guys spray can we, the rookies, make corrections and progress~

Then let’s improve our posture together! ! (Here we use the PHP manual as an example)

Recommended courses: PHP Tutorial.

How to read the php manual

What is a manual?

I believe everyone has read it since childhood. I think the manual is the instruction manual, just like the drawings for assembling a racing car when we were young.

How to read the manual?

I'm glad that I heard Master Yolo say, read the manual more often when you have nothing to do. I don't know what to think. Just start from the beginning and look at the directories one by one until you see how to read the definition of the function

The manual is really clear, but we Novices just think about how to learn more quickly and learn more, and they run all the way, but they forget the most basic things. They can't even read the instructions and they are trying to assemble a four-wheel drive racing car. I just want to emphasize that the manual is really important. You should read the manual corresponding to your own version.

Solution to the first problem: I don’t know where to start

First read the table of contents and read them one by one. It would be great if there is someone who teaches you how to read the manual (as shown in the picture above)

Solution to the second problem: Seeing that the function cannot be used

First of all, I will repeat it based on the definition of the function

Example 1: fopen() function, you We know that this is a function to open a file, but there is still a lot of implicit knowledge in it, do you know?

Example 2: What’s wrong with parameters with &

Solution Question 2: Where to write a function is determined based on logic

The so-called logic: My understanding is from top to bottom in the normal order of development of things (such as: The program is executed sequentially from top to bottom) or from left to right (calling methods in the class library or calling this class to call that class) (execute it step by step)

Solve the second problem : Reporting various errors will not solve the problem and requires step-by-step analysis. Here are some of my personal experiences

1. First, translate the error to know what it means (I’ll tell you secretly, Lingos Dictionary professional translation of IT words)

2. Print the code starting from where you feel the problem is, print it step by step, and see where the problem probably lies

3. Go to Baidu

4. Go home (go to the group) and ask the master for help

How to use the return value? Here we can use the bool return value and the false returned when opening the file in this example to do two things (2 mentioned in the above picture)

1. Debugging errors

2. Logical judgment

##Solve the third problem: I can’t remember after reading it

for(i=0;i<无穷次;i++){
echo  “解决之道:多看多用,在多看多用”;
echo  “相信勤能补拙、孰能生巧 ”;
}
There are actually two methods

1. Just remember the general contents of the directory structure.

Function reference-》How to view the directory

Open the third-level directory Later introduction:

Introduction: What is this extension used for? If you don’t understand, just Baidu

Requirements: Does this extension have any dependencies (consider it only after compilation and installation)

Installation: This extension does not need to be installed. When compiling and installing, which parameters should be used to install this extension?

Configuration: Do you need to modify the configuration of php.ini after installation?

Predefined constants: In fact It is used for the formal parameters of the function

How to quickly check: Careful friends, please observe that every time you click on the dictionary, it is the file directory included in the dictionary name

2. If you want to check and operate files For related functions, even if you only remember the letter f, search in the index and click on which one looks like. After clicking, switch the manual from the index to the directory

The above is the detailed content of How to read the php manual. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn