Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.

Bee-dee-dee-deep!
Bee-dee-dee-deep!
Itâs 8:50 am Monday morning and youâve just realized that during drowsiness you snoozed the alarm and in about 10 minutes the meeting organized by your project manager, and in which you have to explain how the last functionality that you have pushed into production works, begins.
You wear the first shirt you find, a pair of pants and grab a slice of the pizza that was left yesterday at dinner from the fridge,
Pizza? leftover? really?
Finally,
you take the toothbrush a bit of toothpaste and run to the car, there is no time to waste in front of the mirror this morning.
Vroooooom,
From 0 to 100MPH in less than 1 second, which costs half a tank and the back of the car that is still standing while you are already a hundred miles ahead creating a cartoon effect,
Traffic lights, roundabouts, overtaking, stops, crossroads, drawbridge.
Driving to the limit of survival, you arrive at the office at 9:00Â oâclock.
Good Job!
You rush into the meeting room while finish tucking your shirt when your colleagues tell you that the manager took a day off after injuring a fingernail during the regional golf tournament that took place over the last weekend.
The hard life of a web developer!.
Letâs try to learn from what happened,
lesson number 1:Do not press the snooze button;
lesson number 2:Like when you are driving even in your code there are dozens if not hundreds of decisions to be made.
Learn how to deal with them effectively will make you a better programmer.
Today we will talk about âcontrol structuresâ and how their use affects the web applications we develop.
These structures,
such as road directions and road intersections indicate the route your car or your web application must follow.
In PHP there are three main types of control structures,
they are conditional structures, loops and namespaces
letâs start with conditional structures!
They are divided into 3Â types,
if-elseif-else, switch-case and ternary statement.
About the series
This blog post that belongs to the series âPHP basics for Expert developerâ.
If you havenât already read the other articles
have a look at them PHP basics for expert web developers (1' part)Construct and Comments of PHP 7How to use variables (PHP 7)Composite variable in PHP (Arrays, Object and more)PHP operators (part 1)PHP Operators (part 2)Conditional Structures in PHP
The if statement
Imagine you are facing a crossroads.
A junction gives you the opportunity to choose which way to go, you can go left or right.
Strange to say but in PHP you can also have a fork without bifurcations.
An If statement answers the questions,
what do I do if the condition I indicate is correct?
Is there another option if the condition is false?
What about a third or fourth option?
Letâs pretend you chose to take to cycle rather than drive a car,
Here is an example of if-else statement,
$vehicle = "bicycle"; if ($vehicle === "bicycle") { // take route number 1; } else { // take route number 2; }
The code in question will check the condition since the result is true the first block of code will be executed and the code inside the block else will not be taken into consideration.
I have already explained the meaning of the symbol === a tutorial here
In this type of conditional structure, we can also have multiple conditions.
Letâs say that route number 1 is reserved for bicycles, the second for cars and the third for all types of vehicles.
$vehicle = "car"; if ($vehicle === "bicycle") { // take path number 1; } elseif ($vehicle === "car") { // take path number 2; } else { // take path number 3; }
In the above example, our code will check the first condition, understand that the result is false and will go on and check the second one which will be true and will be executed.
If it were to be false, it would have passed the second as well and the code inside the else would have been executed.
As IÂ said,
in PHP we can also have coding without an alternative.
$vehicle = "boat"; if ($vehicle === "plane") { // take path number 1; }
In this case, the code bypasses the entire code block inside the statement.
While I was researching about the content of this article, I come across a blog post written by Nick Galbreath, CTO and co-founder of Signal Sciences, that I found very interesting,
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.