Unlock your potential with a Pro Membership
Here is where you propel your career forward. Come join us today. Learn more.
Class Constants
Lab: Introduction to PHP Object-Oriented Programming (OOP) for WordPress
Video Runtime: 08:58
There are times when you need have some constant value, such as a version. PHP gives the means to declare a constant on the class blueprint using const VERSION
. What is a constant? It’s a special variable that you declare and set just once. It’s not changeable.
In this episode, you’ll learn how to declare, what it is, why you want, and when to use it. You’ll see how to use it within the class and application. You’ll learn about the difference between $this
and self::
.
Hands off the keyboard. Web development starts by thinking first, then planning it out, and then coding it.
Episodes
Total Lab Runtime: 03:04:55
- 1 Lab Introductionfree 08:27
- 2 What is Object-Oriented Programming (OOP)?free 14:14
- 3 What is an object?free 13:30
- 4 Meet the Class Blueprintpro 04:53
- 5 Creating an Objectpro 07:57
- 6 Defining Characteristicspro 10:54
- 7 Putting the Object to Workpro 13:56
- 8 Hiding Away the Complexitypro 22:40
- 9 Working within the Object with $thispro 15:41
- 10 Internal Control of Object Creationpro 15:07
- 11 Class Constantspro 08:58
- 12 Class Staticpro 17:49
- 13 What OOP is Notpro 19:11
- 14 Practical Examplespro 04:52
- 15 Wrap it Uppro 06:46