Book Image

PhpStorm Cookbook

By : Mukund Chaudhary
Book Image

PhpStorm Cookbook

By: Mukund Chaudhary

Overview of this book

Table of Contents (16 chapters)
PhpStorm Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Surrounding code with control structures


Whatever algorithm you think of, whichever tool you use to design the functional requirements, and whichever planet you go to and use whatever hardware as your development platform, there is this fact that is omnipresent and ubiquitous: loops will follow you everywhere. Control structures are the building blocks of any code you think of. Not convinced? Your PizzaDish use case itself will be able to prove it to you.

Getting ready

You need a computer in the first place to make calculations and decisions and solve complex problems in a diligent manner. Does a computer stop by solving just one problem? No. It is programmed to continue for all possible number of times it has been instructed. How does a program achieve this diligence? You said it right. A bit louder please. Yes, control loops. Even though this explanation might appear trivial to all you big guns, yet it is right that you cannot proceed to code without control structures.

PhpStorm lets you...