sachin
answered Nov 30 '-1 00:00
PHP has one function named defined() which useful in this condition
the defined() function used in PHP for checking whether constant is exists or not
in your case
define("IAMDEFINE",1);
if(defined("IAMDEFINE")){
echo "defined";
}
in defined function, we need to pass the constant name as argument, and it check constant already defined or not
it will print defined
defined function return true in above scenario , if it was not defined it will return false