W e b t u t o r i a l s

Define PHP

PHP Installation

PHP INI File

PHP Case Sensitivity

PHP Variable

PHP Echo & Print

PHP Operators

PHP Receiving Input

PHP Decision Making

PHP Loops

PHP Jumping Statement

PHP Image Gallery

PHP Arrays

PHP Date Functions

PHP String Functions

PHP Math Functions

PHP Functions

PHP Variable Scope

PHP Constant Variable

PHP Superglobals

PHP Form Validation

PHP Include Statement

PHP Filter

PHP File Handling

PHP File Upload

PHP Cookies

PHP Session

PHP Send Emails

PHP Captcha

PHP-MySQL Connectivity

PHP MySQL Select

PHP MySQL Insert

PHP MySQL Delete

PHP MySQL Update

PHP Constants

The value of a constant variable is fixed and cannot be change during the execution. By default a constant variables are case-sensitive. Normally, constant identifiers are always written in uppercase.
In PHP, to define a constant variable use define() function and to retrieve the value of a constant variable simply specify constant variable name. Unlike with variables, you do not need to have to specify a '$' symbol. You can also use the function constant() to read a constant's value.

Example 1: Constant Variable with integer value. Example 2: Constant Variable with string value. Example 3: Constant Variable with case-insensitive variable name. Example 4: Constant Variables are Global.