PHP Constants are variables whose values cannot be changed. There are constants that are defined already in PHP but you can also define your own constants.
User Defined Constants
You can define your own constants using PHP define() function.
define('constant-name', 'constant-value', 'case-sensitive(optional)');
Unlike global variables, constant name should not start with $
Ideally, constants are written as uppercase to make it recognizable by others as a constant.
<?php define("SITE_URL", "http://yourwebtech.info"); echo 'This website url is' . SITE_URL; ?>
PHP has pre-defined constants which is called Magic Constants.
||Return the current line number of the file.||4 or Higher|
||Return the full path and filename of the file. If used inside an include, the name of the included file is returned.||4.0.2 or Higher|
||Return the directory of the file. If used inside an include, the directory of the included file is returned. This is equivalent to dirname(__FILE__).||5.3.0 or Higher|
||As of PHP 5 this constant returns the function name as it was declared (case-sensitive). In PHP 4 its value is always lowercased.||4.3 or Higher|
||As of PHP 5 this constant returns the class name as it was declared (case-sensitive). In PHP 4 its value is always lowercased. The class name includes the namespace it was declared in (e.g. Foo\Bar).||4.3 or Higher|
||As of PHP 5.4 this constant returns the trait as it was declared (case-sensitive). The trait name includes the namespace it was declared in (e.g. Foo\Bar).||5.4 or Higher|
||Return the method name is returned as it was declared (case-sensitive).||5.0 or Higher|
||The name of the current namespace (case-sensitive). This constant is defined in compile-time.||5.3 or Higher|
How to take Cialis it seems to me that would already be time to cease to discuss this question. As I already answered it not once. Have it in a look. You shouldn’t worry! All deer go south when they are called by homesickness. Are turned and lie on snow till some hours.