Skip to main content

Posts

Showing posts from June 2, 2013

Basic PHP Constructs

A construct is just short for control structure. Unlike an expression the construct creates a flow of control in the code. The construct controls how or when statements are executed, in order to create a structure of code that effectively tackles the task the programmer aims to achieve. Think of constructs like a place where code gets directed (or literally constructed) during execution. Imagine a busy intersection where lots of cars need to pass through. A construct is like a traffic light that directs how the traffic flows so that there isn’t an accident.