In this article, you will learn how to create a constant in PHP. The const keyword in PHP is used to create constants. Unlike with the define() function, constants created using the const keyword must be declared in the global scope.
examples of the CONST keyword
Example 1. In this example, we create a constant and print its value.
<?php
const MY_CONSTANT = 5;
echo MY_CONSTANT;
?>