How to check if a constant exist in PHP

1 Answer

0 votes
define("CONSTANT", "php constant");

if (defined('CONSTANT')) {
    echo CONSTANT;
}

  
/*
run: 
 
php constant
   
*/   

 



answered May 23, 2018 by avibootz
...