|
|
defined()Before using any constants in our script we can check if it exist or not by using defined() function. We will get Ture of False as return from this function. Here is an example.
define("SITE",'plus2net');
if(defined('SITE')){
echo "Constant SITE exist";
}else { echo "Constant doesn't exist";}
While using the constant name always keep them within quotes like defined('SITE')
To check the variables we use isset()
To check the functions we use function_exists()
To check the constants we use defined()
| |
| |
|
|
|
|
|