Break in PHP

Each case is closed with the break instruction that, when executed, immediately causes us to exit the execution of the switch; if that break was not at the end of each case, once a true case was found and its sentences were executed, the questions of the other cases would continue to be unnecessarily executed, losing time without necessity.

Break in PHP | Learn PHP & MySQL | Each case is closed with the break instruction that, when executed, immediately causes us to exit the execution of the switch; if that break was not at the end of each case, once a true case was found and its sentences were executed, the questions of the other cases would continue to be unnecessarily executed, losing time without necessity

Break in PHP (exit the switch)

Each case is closed with the break instruction that, when executed, immediately causes us to exit the execution of the switch; if that break was not at the end of each case, once a true case was found and its sentences were executed, the questions of the other cases would continue to be unnecessarily executed, losing time unnecessarily.

But what is worse, the default would be executed (which would not have to be executed if a true case was already executed, remember that the default is that it is executed only if all the cases were false).

Now that we know the conditional (if, else, elseif) and selective (switch) structures, we will deepen the complementary tools of these structures, which will allow us to validate the data of our forms with the greatest precision. The main complementary tools are the comparison operators and the logical operators, which we will learn next.

🤖

ChatGPT Free
Ask questions on any topic

CITE ARTICLE


For homework, research, thesis, books, magazines, blogs or academic articles

APA Format Reference:

Delgado, Hugo. (2019).
Break in PHP.
Retrieved Apr 26, 2024, from
https://disenowebakus.net/en/break-php

Participates!

Share it with your friends in Social Networks!

Professor at the University of Guadalajara

Hugo Delgado Desarrollador y Diseñador Web en Puerto Vallarta

Professional in Web Development and SEO Positioning for more than 10 continuous years.
We have more than 200 certificates and recognitions in the Academic and Professional trajectory, including diploma certificates certified by Google.

CONTINUE LEARNING

PREVIOUS


IT ALSO DESERVES TO PAY TO VISIT:

Not finding what you need?

Use our internal search to discover more information
Related content:

Would you like to learn more about Web Design?

Meet all the courses and tutorials that we have for you completely free
Learn Web Design
 

Leave your Comment

SPONSOR

Your business can also appear here. More information

Your browser has blocked advertising.
Please 🙏 allow to visualize the announcements to be able to access, thank you.