PHP Constant

tutorial and example
tutorial and example

PHP constant is an identifier(name) for a simple value. The value does not change during the script. It starts with a letter or underscore not $ sign. The define()function is used to create a constant.

Syntax:

Example:

Output

Welcome to PHP Tutorial

Constants are Global

PHP constant is automatically global. It can be used for entire script.Let’s take an example.

Example