Process control in PHP

Process control is the way human society does things, thinks and handles problems. Through this chapter, you will find that by using computer thinking to think about problems, we will be more rigorous in the process of doing things.

Let’s go through the reasoning process one by one:

There is a tall, rich and handsome man named Wang. His name is - Wang. Student Wang plans to invest in a project. If this project is planned to start, there will be a round trip between Beijing and Dalian every week for this investment project. When will Mr. Wang Si stop going back and forth? After the project fails or Wan (da) Group is temporarily dismissed, he can no longer go back and forth every week.

As for Mr. Wang, he has a good habit. Every time he goes back and forth, he is afraid of how many times he has gone back and forth in a year. Classmate Wang will record the number of round trips in his notepad, writing 1 for the first time, 2 for the second time... until the project is finally stopped.

Classmate Wang’s family is very rich, so his schedule is somewhat different from that of normal people. Not only are there more ways, but Mr. Wang is also superstitious.

There are 6 ways for him to travel, as follows:

1, driver driving
2, civil aviation
3, his own private plane
4, train
5, Horseback Riding
6, Cruise Ship

Every time, Mr. Wang would write 1, 2, 3, 4, 5, 6 on the dice. Whichever way is shaken, Mr. Wang will use that way to travel between the two places.

Moreover, Mr. Wang is a person whose life is extremely full of entertainment and enjoyment. When he arrived in Beijing or Dalian, what he did after arrival was different, as follows:

Arrived in the middle of the night, first went to the nightclub to participate in a masquerade party
Arrived in the morning, took a bath in the hotel
Arrived at noon, I will have a piece of Kobe beef
Arrived at night, I always like to go to friends to talk about my loneliness

Wang is also extremely well-planned in his travels and projects. He assigned business trip itineraries to his personal secretary and work secretary respectively:

Daily life:
Check the weather first, and bring rain gear and towels if it rains. If it doesn’t rain, bring sunscreen.
Check the condition of rain gear, towels and sunscreen in advance. If not, buy them in time.

At work:
Communicate in advance about the work plan before going to Dalian and prepare it. It must be inspected in time. If it passes the inspection, it must be printed and presented in advance.
If it is not ready in time, the main project communication topics should be listed.

Explanation of knowledge points in this chapter
[Silent writing]
if...else
while
for
switch...case
break,continue,exit
【Understand】
goto
do...while
【Skip the knowledge points to learn】
declare


Note:

In order to make process control more interesting, the above stories are all spoofs. We use process control ideas and comments to implement the above code and strengthen our understanding of process control

Continuing Learning
||
submitReset Code