This document provides an overview of PHP basics covered in Session One of a CFPHP ZCE Training. It introduces PHP files and data types like integers, floats, strings, booleans, and arrays. It also covers variables, constants, operators, and basic control structures like conditionals and loops. The document concludes with an overview of error handling in PHP.
4. Scripts
⢠Default Extension: .php
⢠May be Overridden via Server Conf
⢠Not Compiled, Interpreted
⢠Thus, PHP is a text-processing language
4
8. Statement Termination
⢠Semicolons terminate PHP statements
⢠function_call();
⢠$a = 123;
⢠There are few exceptions
⢠Control Structures
⢠Last Line in PHP Script
8
11. Code Blocks
⢠DeďŹned by { Curly Braces }
⢠Groups code into related blocks
⢠Runs under speciďŹc circumstances
⢠Functions
⢠Conditionals
⢠Loops
11
12. Language Constructs
⢠Similar to Functions... different rules
⢠if(), while(), for(), foreach(), function()
⢠echo() vs print()
⢠die(), exit()
12
26. Constants
⢠Similar to variables, but not
⢠Values Stored once, may never be
changed
⢠Names are suggested to be in ALL_CAPS
⢠deďŹne(), deďŹned()
26