Variables and Constants
In this course, You will learn to How to Define Variable and Constants in PHP.
Right after this course, you will be able to define and do simple operations using Variables and Constants.
You will learn about different types of Variables and how the scope of Variable works in the PHP program.
Apart from this, you will also learn about Variable Scopes, Predefined Variables, Variables of Variables and Magic Constants.
Before you take this course, You should know How to write and run simple PHP program.
You should have PHP installation on your machine and also software to write PHP programs.
In this course, you will learn to define Strings and Integer Variables.
Variables are used to store values and which can be changed anytime in the program.
Constants are defined once and cannot change values.
Apart from just defining the Variable, you will understand the scope of the variable like:
- Local Variable
- Global Variable
- Static Variable
- Variables of Variable
You will learn how to print variables using Double quotes.
Understanding Variable Typing is very much important for you to write quality program that does not break.
In Constants you will learn:
- Define Constant
- Difference Between Variable and Constant
- Types of Pre-defined Constants
Most important knowledge you should have is to know what is valid and invalid variable and constants.
You will learn rules of defining the variables names.
Also, you will get to know about the predefined constants that you can use in the program.
Complete Hands-on and Practical Session!
Take the Exercises, Practical Assignment and Quiz to make sure you understand the concept and remember it.
Download the PHP Source Code part of this course which you can keep it as a future reference.
What you’ll learn in this course:
- Define Variables and Constants.
- Quick Intro to String, Integer Data Types and Functions.
- Difference Between Variable and Constants.
- Understand types of Variable Scopes, Predefined Variable, Variable Variables and Magic Constants.
- Work with Exercises, Interview Questions, Resources and Practical Test.
- Lectures 29
- Quizzes 2
- Duration 3 hours
- Skill level All levels
- Language English
- Students 8791
- Assessments Yes
- PHP Coding Standards
- Define a Variable
- Quick Intro to Strings and Integer Data Types
- Rules of Variable Declaration
- Single Quote vs Double Quotes
- Variable Typing – Number to String Conversion
- Quick Intro to Functions
- PHP is Case Sensitive
- Define Local Variables
- Define Global Variables
- Define Static Variables
- Print the built in Super Global Variables
- Variable Variables
- Predefined Variables
- Check Variable is set via isset()
- Define a Constant
- Difference between Variable vs Constant?
- Valid and InValid Constants
- Magic Constants