PHP Constants are the identifiers that cannot be changed. Learn how to create a PHP Constant, and know more about pre-defined constants & Magic constants with examples:
In this tutorial, you will learn what a PHP constant is, how to create PHP constants (using the PHP define() function and the const keyword), predefined constants, magic constants, differences between constants and variables, and frequently asked questions (FAQs).
Please note that we have used PHP version 7 in all examples.
Let’s begin!
=> In-Depth PHP Tutorials for Beginners