check if a constant is defined php code example Example: define value in php $var = 5; //int $var = "hey"; //str $var = 'A'; //char